add lock pin state

This commit is contained in:
poka 2022-05-31 18:58:44 +02:00
parent 8c1383bdd4
commit 86931bab5b
3 changed files with 5 additions and 10 deletions

View File

@ -149,11 +149,14 @@ class MyWalletsProvider with ChangeNotifier {
notifyListeners();
}
int lockPin = 0;
Future resetPinCode([int minutes = 15]) async {
lockPin++;
final actualLock = lockPin;
await Future.delayed(
Duration(seconds: configBox.get('isCacheChecked') ? minutes * 60 : 1));
log.i('reset pin code ...');
pinCode = '';
log.i('reset pin code, lock $actualLock ...');
if (actualLock == lockPin) pinCode = '';
}
void rebuildWidget() {

View File

@ -253,13 +253,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
cron:
dependency: "direct main"
description:
name: cron
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.0"
cross_file:
dependency: transitive
description:

View File

@ -81,7 +81,6 @@ dependencies:
ref: fixAndroidActivityVersion
dots_indicator: ^2.1.0
web_socket_channel: ^2.2.0
cron: ^0.5.0
dev_dependencies:
# flutter_launcher_icons: ^0.9.2