add pin login and add pin code
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user