fix retrocompatibilidade
This commit is contained in:
parent
014cdcac93
commit
a18b97680b
|
@ -125,10 +125,10 @@ class StorageUtil {
|
||||||
|
|
||||||
Future<void> initSharedPreferences() async {
|
Future<void> initSharedPreferences() async {
|
||||||
_sharedPreferences.prefs ??= await SharedPreferences.getInstance();
|
_sharedPreferences.prefs ??= await SharedPreferences.getInstance();
|
||||||
isFirstRun = _sharedPreferences.prefs?.getBool('first_run') ?? true;
|
isFirstRun = _sharedPreferences.prefs?.getBool('milestone') ?? true;
|
||||||
if (isFirstRun) {
|
if (isFirstRun) {
|
||||||
isFirstRun = false;
|
isFirstRun = false;
|
||||||
await _sharedPreferences.prefs?.setBool('first_run', false);
|
await _sharedPreferences.prefs?.setBool('milestone', false);
|
||||||
_secureStorage.purge();
|
_secureStorage.purge();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ class StorageUtil {
|
||||||
bool get isFirstRun => _isFirstRun;
|
bool get isFirstRun => _isFirstRun;
|
||||||
set isFirstRun(bool value) {
|
set isFirstRun(bool value) {
|
||||||
_isFirstRun = value;
|
_isFirstRun = value;
|
||||||
_sharedPreferences.set('first_run', value, (v) => _isFirstRun = v);
|
_sharedPreferences.set('milestone', value, (v) => _isFirstRun = v);
|
||||||
}
|
}
|
||||||
|
|
||||||
String? _deviceDescription;
|
String? _deviceDescription;
|
||||||
|
|
Loading…
Reference in New Issue