add pin login and add pin code

This commit is contained in:
tzw
2024-10-04 13:55:59 +06:30
parent b5023a4171
commit 81dfeb037d
18 changed files with 340 additions and 68 deletions

View File

@@ -108,4 +108,14 @@ class SharedPref {
static Future<void> clearRecentSearch(String key) async {
return await _remove(key);
}
static Future<bool?> getPinLockOn() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
return prefs.getBool('pin_lock');
}
static Future<void> setPinLockOn(bool isLockOn) async {
SharedPreferences prefs = await SharedPreferences.getInstance();
prefs.setBool('pin_lock', isLockOn);
}
}