flutter_screen_lock
flutter_screen_lock copied to clipboard
Can we close the screen lock when native back action is performed ?
I want to close the screen lock overlay when I perform the native back gesture or the back button. Is there already a way to do it ?
https://github.com/naoki0719/flutter_screen_lock/blob/master/lib/src/functions.dart
In the screenLock function, I have a WillPopScopeWidget that sets a condition that I cannot return to.
I think that this can be solved by building the ScreenLockWidget directly.
yes you can use WillPopScope Wrap widget to ScreenLock Function
return WillPopScope( onWillPop: () async => false, child: ScreenLock( correctString: 1234, // onCancelled: Navigator.of(context).pop, onUnlocked: Navigator.of(context).pop,
),
);