Migrated to null-safety!
There are now also integration tests in the example project which can be run using flutter test integration_test/integration_tests.dart
.
Added the ability to override the theme
property of the MaterialApp
which AppLock
uses internally.
runApp(AppLock(
...
theme: ThemeData(
textTheme: TextTheme(
headline1: TextStyle(fontSize: 32),
),
),
));
debugShowCheckedModeBanner
has also been set to false.
Minor updates to docs.
New functionality to specify a period of time between the app going into the background state and when the lock screen should be shown.
runApp(AppLock(
...,
backgroundLockLatency: const Duration(seconds: 30),
));
This allows the app to go into the background state for the specified duration without causing the lock screen to be shown.
showLockScreen
is now a Future
.
await AppLock.of(context).showLockScreen();
print('Did unlock!');
New functionality to show the lock screen on-demand.
AppLock.of(context).showLockScreen();
Update to description.
New functionality to enable or disable the lockScreen
at launch and on-demand.
runApp(AppLock(
builder: ...,
lockScreen: ...,
enabled: false,
));
AppLock.of(context).enable();
AppLock.of(context).disable();
- Removing deprecating
child
method in preference for thebuilder
method. - Updating Flutter version constraints
Deprecating child
method in preference for the builder
method - simply a name change.
Breaking change
An argument can now be passed in to the AppLock
method didUnlock
and is accessible through the builder method, child
- this should be considered a breaking change as the builder method, child
requires a parameter even if null is passed in to didUnlock
.
Initial release
Use AppLock
to provide lock screen functionality to you Flutter apps.