From 913f3cfa70ac2a7420df6ea0b84cc50285a011fd Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Mon, 18 Jan 2021 10:07:37 +0100 Subject: [PATCH] fix: APL --- lib/main.dart | 2 +- lib/views/lock_screen.dart | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 8adeaf96..86c407e2 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -37,7 +37,7 @@ void main() async { } class App extends StatelessWidget { - final GlobalKey _apl = + static final GlobalKey _apl = GlobalKey(); @override Widget build(BuildContext context) { diff --git a/lib/views/lock_screen.dart b/lib/views/lock_screen.dart index 6bff0270..006a6660 100644 --- a/lib/views/lock_screen.dart +++ b/lib/views/lock_screen.dart @@ -7,8 +7,9 @@ import 'package:flutter_secure_storage/flutter_secure_storage.dart'; class LockScreen extends StatelessWidget { @override Widget build(BuildContext context) { + final applock = FlutterSecureStorage().read(key: SettingKeys.appLockKey); return FutureBuilder( - future: FlutterSecureStorage().read(key: SettingKeys.appLockKey), + future: applock, builder: (context, snapshot) { if (snapshot.hasError) { return Scaffold(body: Center(child: Text(snapshot.error.toString())));