feat: add setting for auto-lock fix: fix sideswipe

This commit is contained in:
2026-08-04 01:09:01 +02:00
parent 0997d110d4
commit 812fcc892b
23 changed files with 629 additions and 28 deletions
+19
View File
@@ -27,4 +27,23 @@ void main() {
expect(lockCount, 0);
});
test('does not lock when auto-lock is disabled', () {
var lockCount = 0;
final observer = AppLifecycleLockObserver(
onLock: () => lockCount++,
shouldLock: () => false,
);
for (final state in [
AppLifecycleState.inactive,
AppLifecycleState.hidden,
AppLifecycleState.paused,
AppLifecycleState.detached,
]) {
observer.didChangeAppLifecycleState(state);
}
expect(lockCount, 0);
});
}