Remove animations from app lock

This commit is contained in:
Vishnu Mohandas 2021-03-21 15:23:21 +05:30
parent bf09a87997
commit cabd5f5069

View file

@ -98,10 +98,18 @@ class _AppLockState extends State<AppLock> with WidgetsBindingObserver {
home: this.widget.enabled ? this._lockScreen : this.widget.builder(null),
navigatorKey: _navigatorKey,
theme: widget.themeData,
routes: {
'/lock-screen': (context) => this._lockScreen,
'/unlocked': (context) =>
this.widget.builder(ModalRoute.of(context).settings.arguments)
onGenerateRoute: (settings) {
switch (settings.name) {
case '/lock-screen':
return PageRouteBuilder(
pageBuilder: (_, __, ___) => this._lockScreen);
case '/unlocked':
return PageRouteBuilder(
pageBuilder: (_, __, ___) => this
.widget
.builder(settings.arguments));
}
return PageRouteBuilder(pageBuilder: (_, __, ___) => this._lockScreen);
},
);
}