feat: add setting for auto-lock fix: fix sideswipe
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user