WIP
This commit is contained in:
parent
39ae338fae
commit
a032d3cdd2
|
@ -73,8 +73,8 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisi
|
|||
|
||||
if (selectedDateTime.isBefore(currentDateTime)) {
|
||||
return FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'A data/hora selecionada é inválida',
|
||||
enText: 'The selected date/time is invalid',
|
||||
ptText: 'A data/hora selecionada deve ser no mínimo 24 horas no futuro',
|
||||
enText: 'Selected date/time must be at least 24 hours in the future',
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -97,9 +97,6 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisi
|
|||
|
||||
dateTimeTextController ??= TextEditingController();
|
||||
dateTimeFocusNode ??= FocusNode();
|
||||
dateTimeTextController.text = DateFormat('dd/MM/yyyy HH:mm:ss').format(
|
||||
DateTime.now().add(const Duration(hours: 24)),
|
||||
);
|
||||
|
||||
notesTextController ??= TextEditingController();
|
||||
notesFocusNode ??= FocusNode();
|
||||
|
|
|
@ -53,8 +53,7 @@ class StorageUtil {
|
|||
await SecureStorageHelper().set(data.key, data.value, (v) {});
|
||||
break;
|
||||
case StorageType.sharedPreferences:
|
||||
await SharedPreferencesStorageHelper()
|
||||
.set(data.key, data.value, (v) {});
|
||||
await SharedPreferencesStorageHelper().set(data.key, data.value, (v) {});
|
||||
break;
|
||||
case StorageType.dbSQLite3:
|
||||
await SQLiteStorageHelper().set(data.key, data.value, (v) {});
|
||||
|
@ -140,8 +139,7 @@ class StorageUtil {
|
|||
try {
|
||||
if (_initialized) _sharedPreferences = SharedPreferencesStorageHelper();
|
||||
_sharedPreferences.prefs ??= await SharedPreferences.getInstance();
|
||||
final bool milestone =
|
||||
_sharedPreferences.prefs?.getBool('fre_isFirstRun') ?? true;
|
||||
final bool milestone = _sharedPreferences.prefs?.getBool('fre_isFirstRun') ?? true;
|
||||
if (milestone) {
|
||||
isFirstRun = false;
|
||||
await _sharedPreferences.prefs?.setBool('fre_isFirstRun', false);
|
||||
|
@ -153,8 +151,7 @@ class StorageUtil {
|
|||
}
|
||||
} catch (e, s) {
|
||||
log('SharedPreferencesStorageHelper: Error during initialization');
|
||||
LogUtil.requestAPIFailed(
|
||||
'$UniqueKey', '$UniqueKey', 'SharedPreferencesStorageHelper', e, s);
|
||||
LogUtil.requestAPIFailed('$UniqueKey', '$UniqueKey', 'SharedPreferencesStorageHelper', e, s);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -171,12 +168,10 @@ class StorageUtil {
|
|||
_panicPass = await _secureStorage.getString('fre_panicPass');
|
||||
_fingerprintPass = await _secureStorage.getString('fre_fingerprintPass');
|
||||
_haveLocal = await _secureStorage.getBool('fre_have_local') ?? false;
|
||||
_deviceDescription =
|
||||
await _secureStorage.getString('fre_deviceDescription');
|
||||
_deviceDescription = await _secureStorage.getString('fre_deviceDescription');
|
||||
} catch (e, s) {
|
||||
log('SecureStorageHelper: Error during initialization: $e');
|
||||
LogUtil.requestAPIFailed(
|
||||
'$UniqueKey', '$UniqueKey', 'SecureStorageHelper', e, s);
|
||||
LogUtil.requestAPIFailed('$UniqueKey', '$UniqueKey', 'SecureStorageHelper', e, s);
|
||||
}
|
||||
log('SecureStorageHelper: Initialization complete');
|
||||
}
|
||||
|
@ -204,12 +199,10 @@ class StorageUtil {
|
|||
_access = await _sqliteStorage.getBoolean('fre_access');
|
||||
_panic = await _sqliteStorage.getBoolean('fre_panic');
|
||||
_person = await _sqliteStorage.getBoolean('fre_person');
|
||||
_requestOSnotification =
|
||||
await _sqliteStorage.getBoolean('fre_requestOSnotification');
|
||||
_requestOSnotification = await _sqliteStorage.getBoolean('fre_requestOSnotification');
|
||||
} catch (e, s) {
|
||||
log('SQLiteStorageHelper: Error during initialization: $e');
|
||||
LogUtil.requestAPIFailed(
|
||||
'$UniqueKey', '$UniqueKey', 'SQLiteStorageHelper', e, s);
|
||||
LogUtil.requestAPIFailed('$UniqueKey', '$UniqueKey', 'SQLiteStorageHelper', e, s);
|
||||
}
|
||||
log('SQLiteStorageHelper: Initialization complete');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue