Merge pull request #49 from FRE-Informatica/hotfix/menu

Seleção de Itens do Menu após tempo ocioso em background
This commit is contained in:
Ivan Antunes 2024-10-23 08:14:31 -03:00 committed by GitHub
commit c5fa3a719b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 16 deletions

View File

@ -57,8 +57,8 @@ android {
compileOptions { compileOptions {
coreLibraryDesugaringEnabled true coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_11 sourceCompatibility JavaVersion.VERSION_18
targetCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_18
} }
kotlinOptions { kotlinOptions {

View File

@ -19,6 +19,7 @@ import 'package:hub/flutter_flow/internationalization.dart';
import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/flutter_flow/nav/nav.dart';
import 'package:hub/pages/forgot_password_page/forgot_password_screen.dart'; import 'package:hub/pages/forgot_password_page/forgot_password_screen.dart';
import 'package:hub/shared/helpers/shared_preferences_storage_helper.dart'; import 'package:hub/shared/helpers/shared_preferences_storage_helper.dart';
import 'package:hub/shared/services/localization/localization_service.dart';
import 'package:hub/shared/utils/device_util.dart'; import 'package:hub/shared/utils/device_util.dart';
import 'package:hub/shared/utils/storage_util.dart'; import 'package:hub/shared/utils/storage_util.dart';
import 'package:responsive_framework/responsive_framework.dart'; import 'package:responsive_framework/responsive_framework.dart';
@ -286,11 +287,9 @@ class _AppState extends State<App> with WidgetsBindingObserver {
} }
@override void didChangeAppLifecycleState(AppLifecycleState state) async { @override void didChangeAppLifecycleState(AppLifecycleState state) async {
if (state == AppLifecycleState.resumed) { if (state == AppLifecycleState.resumed) await StorageUtil().ensureInitialization();
if (state == AppLifecycleState.resumed) LocalizationService.processLocals(context);
await StorageUtil().ensureInitialization(); else LocalizationService.processData(context);
}
} }
@override Widget build(BuildContext context) { @override Widget build(BuildContext context) {

View File

@ -237,32 +237,28 @@ class StorageUtil {
String get deviceDescription => _deviceDescription ?? ''; String get deviceDescription => _deviceDescription ?? '';
set deviceDescription(String value) { set deviceDescription(String value) {
_deviceDescription = value; _deviceDescription = value;
_secureStorage.set( _secureStorage.set('fre_deviceDescription', value, (v) => _deviceDescription = v);
'fre_deviceDescription', value, (v) => _deviceDescription = v);
} }
BuildContext? _context; BuildContext? _context;
BuildContext? get context => _context; BuildContext? get context => _context;
set context(BuildContext? value) { set context(BuildContext? value) {
_context = value; _context = value;
_secureStorage.set( _secureStorage.set('fre_context', value.toString(), (v) => _context = value);
'fre_context', value.toString(), (v) => _context = value);
} }
bool _haveLocal = false; bool _haveLocal = false;
bool get haveLocal => _haveLocal; bool get haveLocal => _haveLocal;
set haveLocal(bool value) { set haveLocal(bool value) {
_haveLocal = value; _haveLocal = value;
_secureStorage.set( _secureStorage.set('fre_have_local', value ?? false, (v) => _haveLocal = value);
'fre_have_local', value ?? false, (v) => _haveLocal = value);
} }
String? _fingerprintPass; String? _fingerprintPass;
String get fingerprintPass => _fingerprintPass ?? ''; String get fingerprintPass => _fingerprintPass ?? '';
set fingerprintPass(String value) { set fingerprintPass(String value) {
_fingerprintPass = value; _fingerprintPass = value;
_secureStorage.set( _secureStorage.set('fre_fingerprintPass', value, (v) => _fingerprintPass = v);
'fre_fingerprintPass', value, (v) => _fingerprintPass = v);
} }
String? _accessPass; String? _accessPass;

View File

@ -3,7 +3,7 @@ description: A new Flutter project.
publish_to: "none" publish_to: "none"
version: 1.1.0+10 version: 1.1.1+11
environment: environment:
sdk: ">=3.0.0 <4.0.0" sdk: ">=3.0.0 <4.0.0"