diff --git a/android/app/build.gradle b/android/app/build.gradle index 62e36bbf..af88cf55 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -57,8 +57,8 @@ android { compileOptions { coreLibraryDesugaringEnabled true - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 + sourceCompatibility JavaVersion.VERSION_18 + targetCompatibility JavaVersion.VERSION_18 } kotlinOptions { diff --git a/lib/main.dart b/lib/main.dart index fb4aec87..a4358e0e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -19,6 +19,7 @@ import 'package:hub/flutter_flow/internationalization.dart'; import 'package:hub/flutter_flow/nav/nav.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/services/localization/localization_service.dart'; import 'package:hub/shared/utils/device_util.dart'; import 'package:hub/shared/utils/storage_util.dart'; import 'package:responsive_framework/responsive_framework.dart'; @@ -286,11 +287,9 @@ class _AppState extends State with WidgetsBindingObserver { } @override void didChangeAppLifecycleState(AppLifecycleState state) async { - if (state == AppLifecycleState.resumed) { - - await StorageUtil().ensureInitialization(); - - } + if (state == AppLifecycleState.resumed) await StorageUtil().ensureInitialization(); + if (state == AppLifecycleState.resumed) LocalizationService.processLocals(context); + else LocalizationService.processData(context); } @override Widget build(BuildContext context) { diff --git a/lib/shared/utils/storage_util.dart b/lib/shared/utils/storage_util.dart index 4dc1e80a..fa5c554b 100644 --- a/lib/shared/utils/storage_util.dart +++ b/lib/shared/utils/storage_util.dart @@ -237,32 +237,28 @@ class StorageUtil { String get deviceDescription => _deviceDescription ?? ''; set deviceDescription(String value) { _deviceDescription = value; - _secureStorage.set( - 'fre_deviceDescription', value, (v) => _deviceDescription = v); + _secureStorage.set('fre_deviceDescription', value, (v) => _deviceDescription = v); } BuildContext? _context; BuildContext? get context => _context; set context(BuildContext? value) { _context = value; - _secureStorage.set( - 'fre_context', value.toString(), (v) => _context = value); + _secureStorage.set('fre_context', value.toString(), (v) => _context = value); } bool _haveLocal = false; bool get haveLocal => _haveLocal; set haveLocal(bool value) { _haveLocal = value; - _secureStorage.set( - 'fre_have_local', value ?? false, (v) => _haveLocal = value); + _secureStorage.set('fre_have_local', value ?? false, (v) => _haveLocal = value); } String? _fingerprintPass; String get fingerprintPass => _fingerprintPass ?? ''; set fingerprintPass(String value) { _fingerprintPass = value; - _secureStorage.set( - 'fre_fingerprintPass', value, (v) => _fingerprintPass = v); + _secureStorage.set('fre_fingerprintPass', value, (v) => _fingerprintPass = v); } String? _accessPass; diff --git a/pubspec.yaml b/pubspec.yaml index a5073de5..eae46f01 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A new Flutter project. publish_to: "none" -version: 1.1.0+10 +version: 1.1.1+11 environment: sdk: ">=3.0.0 <4.0.0"