This commit is contained in:
J. A. Messias 2024-10-15 16:07:03 -03:00
parent 0661db5fcd
commit 148b10b81e
17 changed files with 216 additions and 191 deletions

View File

@ -47,22 +47,22 @@ android {
defaultConfig {
applicationId "com.freaccess.hub"
minSdkVersion 21
minSdkVersion 23
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
consumerProguardFiles 'proguard.txt'
consumerProguardFiles 'proguard-rules.pro'
}
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_18
targetCompatibility JavaVersion.VERSION_18
}
kotlinOptions {
jvmTarget = "11"
jvmTarget = "18"
}
signingConfigs {
@ -88,9 +88,15 @@ android {
buildTypes {
release {
signingConfig = signingConfigs.release
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
signingConfig signingConfigs.debug
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
@ -104,9 +110,12 @@ dependencies {
implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.window:window:1.0.0'
implementation 'androidx.window:window-java:1.0.0'
implementation 'com.google.mlkit:face-detection:16.1.7'
implementation ('com.google.firebase:firebase-messaging:24.0.0') {
exclude group: 'com.google.firebase', module: 'firebase-iid'
}
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
}
apply plugin: 'com.google.gms.google-services'

View File

@ -16,4 +16,11 @@
# Keep rules to prevent R8 from removing necessary classes
-dontwarn com.google.j2objc.annotations.RetainedWith
-keep class com.google.j2objc.annotations.RetainedWith { *; }
-keep class com.google.j2objc.annotations.RetainedWith { *; }
-keep class com.google.common.reflect.TypeToken
-keep class * extends com.google.common.reflect.TypeToken
-keep class com.google.gson.reflect.TypeToken { *; }
-keep class com.google.common.reflect.TypeToken { *; }

View File

@ -30,46 +30,33 @@
android:turnScreenOn="true">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<meta-data android:name="flutter_deeplinking_enabled" android:value="false" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="freaccess.com.br" android:pathPrefix="/freaccess/alterarSenha.php" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="freaccess" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="mensagem" />
<category android:name="android.intent.category.DEFAULT" />
@ -109,7 +96,7 @@
android:value="2" />
<receiver android:exported="false"
<!-- <receiver android:exported="false"
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
<receiver android:exported="false"
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
@ -119,7 +106,7 @@
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON" />
</intent-filter>
</receiver>
</receiver> -->
</application>
<queries>

View File

@ -16,4 +16,11 @@
# Keep rules to prevent R8 from removing necessary classes
-dontwarn com.google.j2objc.annotations.RetainedWith
-keep class com.google.j2objc.annotations.RetainedWith { *; }
-keep class com.google.j2objc.annotations.RetainedWith { *; }
-keep class com.google.common.reflect.TypeToken
-keep class * extends com.google.common.reflect.TypeToken
-keep class com.google.gson.reflect.TypeToken { *; }
-keep class com.google.common.reflect.TypeToken { *; }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

View File

@ -11,7 +11,8 @@ import 'package:hub/flutter_flow/nav/nav.dart';
import 'package:hub/shared/utils/dialog_util.dart';
import 'package:hub/shared/utils/storage_util.dart';
Future<void> onMessageReceived(Map<String, dynamic> payload, String? extra, String? handleClick) async {
Future<void> onMessageReceived(
Map<String, dynamic> payload, String? extra, String? handleClick) async {
final localId = jsonDecode(payload['local']!)['CLI_ID'];
final cliUUID = StorageUtil().cliUUID;
@ -283,11 +284,10 @@ class NotificationService {
await AwesomeNotifications()
.isNotificationAllowed()
.then((isAllowed) async {
final bool requestOSnotification =
StorageUtil().requestOSnotification;
final bool requestOSnotification = StorageUtil().requestOSnotification;
if (!requestOSnotification) {
if (!isAllowed) {
if (requestOSnotification == false) {
if (isAllowed == false) {
StorageUtil().requestOSnotification = true;
await AwesomeNotifications().requestPermissionToSendNotifications();
}
@ -350,7 +350,7 @@ class NotificationService {
actionButtons: actionButtons,
schedule: scheduled
? NotificationInterval(
interval: interval,
interval: Duration(seconds: interval!),
timeZone:
await AwesomeNotifications().getLocalTimeZoneIdentifier(),
preciseAlarm: true)

View File

@ -17,17 +17,16 @@ import 'package:hub/flutter_flow/flutter_flow_theme.dart';
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/utils/storage_util.dart';
import 'package:responsive_framework/responsive_framework.dart';
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
void main() async {
await initializeApp();
runApp(const App());
FirebaseMessaging.onBackgroundMessage(_backgroundHandlerMessage);
}
Future<void> initializeApp() async {
@ -41,21 +40,30 @@ Future<void> initializeApp() async {
_initializeSystemSettings();
await _initializeFlutterFlow();
}
Future<void> _initializeStorageHelpers() async {
log('Initializing SharedPreferencesStorageHelper');
await SharedPreferencesStorageHelper().initialize();
log('Initializing SharedPreferencesStorageHelper');
await StorageUtil().ensureInitialization();
}
Future<void> _initializeTracking() async {
await AppTrackingTransparency.requestTrackingAuthorization();
}
Future<void> _initializeFirebase() async {
await Firebase.initializeApp();
}
Future<void> _initializeNotificationService() async {
await NotificationService.initialize();
}
void _initializeUrlStrategy() {
setUrlStrategy(PathUrlStrategy());
}
void _initializeSystemSettings() {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
if (kDebugMode) {
@ -67,6 +75,7 @@ void _initializeSystemSettings() {
}
}
}
Future<void> _initializeFlutterFlow() async {
await FlutterFlowTheme.initialize();
await FFLocalizations.initialize();
@ -86,6 +95,7 @@ Future<void> _foregroundHandlerMessage(RemoteMessage message) async {
payload: Map<String, String>.from(message.data));
}
}
Future<void> _backgroundHandlerMessage(RemoteMessage message) async {
if (message.data['click_action'] == 'enroll_cond') {
log('backgroundHandlerMessage');
@ -103,8 +113,8 @@ class App extends StatefulWidget {
static _AppState of(BuildContext context) =>
context.findAncestorStateOfType<_AppState>()!;
}
class _AppState extends State<App> {
class _AppState extends State<App> {
Locale? _locale = FFLocalizations.getStoredLocale();
ThemeMode _themeMode = FlutterFlowTheme.themeMode;
late AppStateNotifier _appStateNotifier;
@ -145,12 +155,13 @@ class _AppState extends State<App> {
}),
),
);
final Iterable<LocalizationsDelegate<dynamic>>? localizationsDelegates = const [
FFLocalizationsDelegate(),
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
];
final Iterable<LocalizationsDelegate<dynamic>>? localizationsDelegates =
const [
FFLocalizationsDelegate(),
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
];
final Iterable<Locale> supportedLocales = const [
Locale('pt'),
Locale('en'),
@ -179,6 +190,7 @@ class _AppState extends State<App> {
if (!isRecovered) openAppLink(uri);
});
}
void openAppLink(Uri uri) {
final bool isRecovered = StorageUtil().isRecovered;
log('isRecovered: $isRecovered');
@ -187,28 +199,28 @@ class _AppState extends State<App> {
final String email = uri.queryParameters['email'] ?? '';
final String token = uri.queryParameters['token'] ?? '';
final bool isNotEmpty = email.isNotEmpty && token.isNotEmpty;
if (isNotEmpty ) {
if (isNotEmpty) {
final BuildContext context = StorageUtil().context!;
final MediaQueryData mediaQuery = MediaQuery.of(context);
final double height = mediaQuery.size.height * 0.6;
final FlutterFlowTheme theme = FlutterFlowTheme.of(context);
final Widget screen = ForgotPasswordScreen(email: email, token: token);
builder(context) => screen;
showModalBottomSheet(
context: context,
builder: (context) => Padding(padding: MediaQuery.viewInsetsOf(context), child: builder(context)),
isScrollControlled: true,
// barrierColor: theme.primaryBackground.withOpacity(0.2),
backgroundColor: theme.primaryBackground,
showDragHandle: true,
useSafeArea: true,
enableDrag: true,
// isDismissible: true,
).whenComplete(() => StorageUtil().isRecovered = false);
showModalBottomSheet(
context: context,
builder: (context) => Padding(
padding: MediaQuery.viewInsetsOf(context), child: builder(context)),
isScrollControlled: true,
// barrierColor: theme.primaryBackground.withOpacity(0.2),
backgroundColor: theme.primaryBackground,
showDragHandle: true,
useSafeArea: true,
enableDrag: true,
// isDismissible: true,
).whenComplete(() => StorageUtil().isRecovered = false);
}
}
void _setupFirebaseMessaging() async {
FirebaseMessaging messaging = FirebaseMessaging.instance;
RemoteMessage? initialMessage = await messaging.getInitialMessage();
@ -236,10 +248,12 @@ class _AppState extends State<App> {
}
});
}
void setLocale(String language) {
setState(() => _locale = createLocale(language));
FFLocalizations.storeLocale(language);
}
void setThemeMode(ThemeMode mode) {
setState(() {
_themeMode = mode;
@ -247,23 +261,28 @@ class _AppState extends State<App> {
});
}
@override void initState() {
@override
void initState() {
super.initState();
FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
_appStateNotifier = AppStateNotifier.instance;
_router = createRouter(_appStateNotifier);
Future.delayed(const Duration(milliseconds: 1000),
() => setState(() => _appStateNotifier.stopShowingSplashImage()));
() => setState(() => _appStateNotifier.stopShowingSplashImage()));
_setupFirebaseMessaging();
WidgetsBinding.instance.addPersistentFrameCallback((_) => initDeepLinks());
}
@override void dispose() {
@override
void dispose() {
_linkSubscription?.cancel();
super.dispose();
}
@override Widget build(BuildContext context) {
@override
Widget build(BuildContext context) {
return MaterialApp.router(
key: navigatorKey,
title: 'FRE ACCESS HUB',
@ -277,5 +296,4 @@ class _AppState extends State<App> {
routerConfig: _router,
);
}
}

View File

@ -1,5 +1,4 @@
import 'dart:developer';
import 'package:hub/shared/utils/storage_util.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:hub/shared/utils/cache_util.dart';
@ -8,6 +7,7 @@ class SharedPreferencesStorageHelper implements Storage {
static final SharedPreferencesStorageHelper _instance =
SharedPreferencesStorageHelper._internal();
SharedPreferences? _prefs;
SharedPreferences? get prefs => _prefs;
set prefs(SharedPreferences? value) => _prefs = value;
@ -17,47 +17,38 @@ class SharedPreferencesStorageHelper implements Storage {
static SharedPreferencesStorageHelper get instance => _instance;
Future<void> _setAndCache<T>(String key, T value, Function(T) cacheSetter,
Future<void> Function(String, T) setFunc) async {
Future<void> initialize() async => _prefs = await SharedPreferences.getInstance();
Future<void> _setAndCache<T>(String key, T value, Function(T) cacheSetter, Future<void> Function(String, T) setFunc) async {
log('setAndCache value for key: $key to $value');
await setFunc(key, value);
CacheUtil.instance.set(key, value);
cacheSetter(value);
}
Future<void> _setAndCacheString(
String key, String value, Function(String) cacheSetter) async {
Future<void> _setAndCacheString(String key, String value, Function(String) cacheSetter) async {
log('setAndCacheString value for key: $key to $value');
await _setAndCache(key, value, cacheSetter, _prefs!.setString);
}
Future<void> _setAndCacheBool(
String key, bool value, Function(bool) cacheSetter) async {
Future<void> _setAndCacheBool(String key, bool value, Function(bool) cacheSetter) async {
log('setAndCacheBool value for key: $key to $value');
await _setAndCache(key, value, cacheSetter, _prefs!.setBool);
}
Future<void> _setAndCacheInt(
String key, int value, Function(int) cacheSetter) async {
Future<void> _setAndCacheInt(String key, int value, Function(int) cacheSetter) async {
log('setAndCacheInt value for key: $key to $value');
await _setAndCache(key, value, cacheSetter, _prefs!.setInt);
}
Future<void> _setAndCacheDouble(
String key, double value, Function(double) cacheSetter) async {
Future<void> _setAndCacheDouble(String key, double value, Function(double) cacheSetter) async {
log('setAndCacheDouble value for key: $key to $value');
await _setAndCache(key, value, cacheSetter, _prefs!.setDouble);
}
Future<void> _setAndCacheStringList(String key, List<String> value,
Function(List<String>) cacheSetter) async {
Future<void> _setAndCacheStringList(String key, List<String> value, Function(List<String>) cacheSetter) async {
log('setAndCacheStringList value for key: $key to $value');
await _setAndCache(key, value, cacheSetter, _prefs!.setStringList);
}
@override
Future<void> set(
String key, dynamic value, Function(dynamic) cacheSetter) async {
@override Future<void> set(String key, dynamic value, Function(dynamic) cacheSetter) async {
if (value is bool) {
log('() => setAndCacheBool $key to $value');
await _prefs?.setBool(key, value);
@ -72,9 +63,7 @@ class SharedPreferencesStorageHelper implements Storage {
}
CacheUtil.instance.set(key, value);
}
@override
Future<dynamic> get(String key) async {
@override Future<dynamic> get(String key) async {
log('Getting value for key: $key');
var value = CacheUtil.instance.get(key);
if (value == null) {
@ -83,18 +72,16 @@ class SharedPreferencesStorageHelper implements Storage {
}
return value;
}
@override
Future<void> delete(String key) async {
@override Future<void> delete(String key) async {
log('Deleting value for key: $key');
await _prefs?.remove(key);
CacheUtil.instance.delete(key);
}
@override
Future<void> purge() async {
@override Future<void> purge() async {
log('Purging shared preferences');
await _prefs?.clear();
CacheUtil.instance.clear();
}
}

View File

@ -22,7 +22,6 @@ class StorageData {
final String key;
final dynamic value;
final StorageType type;
StorageData(this.key, this.value, this.type);
}
@ -35,10 +34,9 @@ class StorageUtil {
StorageUtil._internal();
final SQLiteStorageHelper _sqliteStorage = SQLiteStorageHelper();
final SecureStorageHelper _secureStorage = SecureStorageHelper();
final SharedPreferencesStorageHelper _sharedPreferences =
SharedPreferencesStorageHelper();
late final SQLiteStorageHelper _sqliteStorage;
late final SecureStorageHelper _secureStorage;
late final SharedPreferencesStorageHelper _sharedPreferences;
static Future<void> set(StorageData data) async {
try {
@ -120,21 +118,31 @@ class StorageUtil {
}
Future<void> ensureInitialization() async {
await initSQLiteStorage();
await initSharedPreferences();
await initSecureStorage();
try {
_sqliteStorage = SQLiteStorageHelper();
_secureStorage = SecureStorageHelper();
_sharedPreferences = SharedPreferencesStorageHelper();
await initSharedPreferences();
await initSecureStorage();
await initSQLiteStorage();
} catch (e, s) {
log('Error initializing storage: $e');
LogUtil.requestAPIFailed('$UniqueKey', '$UniqueKey', 'StorageUtil', e, s);
}
}
Future<void> initSharedPreferences() async {
try {
_sharedPreferences.prefs ??= await SharedPreferences.getInstance();
final bool milestone =
_sharedPreferences.prefs?.getBool('milestone') ?? true;
_sharedPreferences.prefs?.getBool('fre_isFirstRun') ?? true;
if (milestone) {
isFirstRun = false;
await _sharedPreferences.prefs?.setBool('milestone', false);
_secureStorage.purge();
_sqliteStorage.purge();
await _sharedPreferences.prefs?.setBool('fre_isFirstRun', false);
isLogged = false;
// _secureStorage.purge();
// _sqliteStorage.purge();
}
} catch (e, s) {
log('SharedPreferencesStorageHelper: Error during initialization');
@ -146,19 +154,21 @@ class StorageUtil {
Future<void> initSecureStorage() async {
log('SecureStorageHelper: Starting initialization');
try {
_email = await _secureStorage.getString('ff_email');
_passwd = await _secureStorage.getString('ff_passwd');
_deviceType = await _secureStorage.getString('ff_deviceType');
_isLogged = await _secureStorage.getBool('ff_isLogged') ?? false;
_tokenAPNS = await _secureStorage.getString('ff_tokenAPNS');
_accessPass = await _secureStorage.getString('accessPass');
_panicPass = await _secureStorage.getString('panicPass');
_fingerprintPass = await _secureStorage.getString('fingerprintPass');
_haveLocal = await _secureStorage.getBool('ff_have_local') ?? false;
_deviceDescription = await _secureStorage.getString('deviceDescription');
_email = await _secureStorage.getString('fre_email');
_passwd = await _secureStorage.getString('fre_passwd');
_deviceType = await _secureStorage.getString('fre_deviceType');
_isLogged = await _secureStorage.getBool('fre_isLogged') ?? false;
_tokenAPNS = await _secureStorage.getString('fre_tokenAPNS');
_accessPass = await _secureStorage.getString('fre_accessPass');
_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');
} 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');
}
@ -166,30 +176,32 @@ class StorageUtil {
Future<void> initSQLiteStorage() async {
log('SQLiteStorageHelper: Starting initialization');
try {
await _sqliteStorage.database;
_devUUID = await _sqliteStorage.get('devUUID') ?? '';
_userUUID = await _sqliteStorage.get('userUUID') ?? '';
_userDevUUID = await _sqliteStorage.get('userDevUUID') ?? '';
_status = await _sqliteStorage.get('status') ?? '';
_userName = await _sqliteStorage.get('userName') ?? '';
_cliUUID = await _sqliteStorage.get('cliUUID') ?? '';
_ownerUUID = await _sqliteStorage.get('ownerUUID') ?? '';
_cliName = await _sqliteStorage.get('cliName') ?? '';
_petAmountRegister = await _sqliteStorage.get('petAmountRegister') ?? '';
_whatsapp = await _sqliteStorage.getBoolean('whatsapp');
_provisional = await _sqliteStorage.getBoolean('provisional');
_pets = await _sqliteStorage.getBoolean('pets');
_local = await _sqliteStorage.getBoolean('local');
_notify = await _sqliteStorage.getBoolean('notify');
_fingerprint = await _sqliteStorage.getBoolean('fingerprint');
_access = await _sqliteStorage.getBoolean('access');
_panic = await _sqliteStorage.getBoolean('panic');
_person = await _sqliteStorage.getBoolean('person');
// await _sqliteStorage.database;
_devUUID = await _sqliteStorage.get('fre_devUUID') ?? '';
_userUUID = await _sqliteStorage.get('fre_userUUID') ?? '';
_userDevUUID = await _sqliteStorage.get('fre_userDevUUID') ?? '';
_status = await _sqliteStorage.get('fre_status') ?? '';
_userName = await _sqliteStorage.get('fre_userName') ?? '';
_cliUUID = await _sqliteStorage.get('fre_cliUUID') ?? '';
_ownerUUID = await _sqliteStorage.get('fre_ownerUUID') ?? '';
_cliName = await _sqliteStorage.get('fre_cliName') ?? '';
_petAmountRegister =
await _sqliteStorage.get('fre_petAmountRegister') ?? '';
_whatsapp = await _sqliteStorage.getBoolean('fre_whatsapp');
_provisional = await _sqliteStorage.getBoolean('fre_provisional');
_pets = await _sqliteStorage.getBoolean('fre_pets');
_local = await _sqliteStorage.getBoolean('fre_local');
_notify = await _sqliteStorage.getBoolean('fre_notify');
_fingerprint = await _sqliteStorage.getBoolean('fre_fingerprint');
_access = await _sqliteStorage.getBoolean('fre_access');
_panic = await _sqliteStorage.getBoolean('fre_panic');
_person = await _sqliteStorage.getBoolean('fre_person');
_requestOSnotification =
await _sqliteStorage.getBoolean('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');
}
@ -206,13 +218,11 @@ class StorageUtil {
String get tempToken => _tempToken;
set tempToken(String value) => _tempToken = value;
bool _isFirstRun = true;
bool get isFirstRun => _isFirstRun;
set isFirstRun(bool value) {
_isFirstRun = value;
_sharedPreferences.set('milestone', value, (v) => _isFirstRun = v);
_sharedPreferences.set('fre_isFirstRun', value, (v) => _isFirstRun = v);
}
String? _deviceDescription;
@ -220,218 +230,220 @@ class StorageUtil {
set deviceDescription(String value) {
_deviceDescription = value;
_secureStorage.set(
'deviceDescription', value, (v) => _deviceDescription = v);
'fre_deviceDescription', value, (v) => _deviceDescription = v);
}
BuildContext? _context;
BuildContext? get context => _context;
set context(BuildContext? value) {
_context = value;
_secureStorage.set('ff_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('ff_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('fingerprintPass', value, (v) => _fingerprintPass = v);
_secureStorage.set(
'fre_fingerprintPass', value, (v) => _fingerprintPass = v);
}
String? _accessPass;
String get accessPass => _accessPass ?? '';
set accessPass(String value) {
_accessPass = value;
_secureStorage.set('accessPass', value, (v) => _accessPass = v);
_secureStorage.set('fre_accessPass', value, (v) => _accessPass = v);
}
String? _panicPass;
String get panicPass => _panicPass ?? '';
set panicPass(String value) {
_panicPass = value;
_secureStorage.set('panicPass', value, (v) => _panicPass = v);
_secureStorage.set('fre_panicPass', value, (v) => _panicPass = v);
}
String? _tokenAPNS;
String? get tokenAPNS => _tokenAPNS;
set tokenAPNS(String? value) {
_tokenAPNS = value;
_secureStorage.set('ff_tokenAPNS', value ?? '', (v) => _tokenAPNS = v);
_secureStorage.set('fre_tokenAPNS', value ?? '', (v) => _tokenAPNS = v);
}
String? _email;
String get email => _email ?? '';
set email(String value) {
_email = value;
_secureStorage.set('ff_email', value, (v) => _email = v);
_secureStorage.set('fre_email', value, (v) => _email = v);
}
String? _passwd;
String get passwd => _passwd ?? '';
set passwd(String value) {
_passwd = value;
_secureStorage.set('ff_passwd', value, (v) => _passwd = v);
_secureStorage.set('fre_passwd', value, (v) => _passwd = v);
}
String? _deviceType;
String get deviceType => _deviceType ?? '';
set deviceType(String value) {
_deviceType = value;
_secureStorage.set('ff_deviceType', value, (v) => _deviceType = v);
_secureStorage.set('fre_deviceType', value, (v) => _deviceType = v);
}
bool _isLogged = false;
bool get isLogged => _isLogged;
set isLogged(bool value) {
_isLogged = value;
_secureStorage.set('ff_isLogged', value, (v) => _isLogged = v);
_secureStorage.set('fre_isLogged', value, (v) => _isLogged = v);
}
String? _token;
String get token => _token ?? '';
set token(String value) {
_token = value;
_secureStorage.set('ff_token', value, (v) => _token = v);
_secureStorage.set('fre_token', value, (v) => _token = v);
}
String _devUUID = '';
String get devUUID => _devUUID;
set devUUID(String value) {
_devUUID = value;
_sqliteStorage.set('devUUID', value, (v) {});
_sqliteStorage.set('fre_devUUID', value, (v) {});
}
String _userUUID = '';
String get userUUID => _userUUID;
set userUUID(String value) {
_userUUID = value;
_sqliteStorage.set('userUUID', value, (v) {});
_sqliteStorage.set('fre_userUUID', value, (v) {});
}
String _userDevUUID = '';
String get userDevUUID => _userDevUUID;
set userDevUUID(String value) {
_userDevUUID = value;
_sqliteStorage.set('userDevUUID', value, (v) {});
_sqliteStorage.set('fre_userDevUUID', value, (v) {});
}
String _status = '';
String get status => _status;
set status(String value) {
_status = value;
_sqliteStorage.set('status', value, (v) {});
_sqliteStorage.set('fre_status', value, (v) {});
}
String _userName = '';
String get userName => _userName;
set userName(String value) {
_userName = value;
_sqliteStorage.set('userName', value, (v) {});
_sqliteStorage.set('fre_userName', value, (v) {});
}
String _cliUUID = '';
String get cliUUID => _cliUUID;
set cliUUID(String value) {
_cliUUID = value;
_sqliteStorage.set('cliUUID', value, (v) {});
_sqliteStorage.set('fre_cliUUID', value, (v) {});
}
String _ownerUUID = '';
String get ownerUUID => _ownerUUID;
set ownerUUID(String value) {
_ownerUUID = value;
_sqliteStorage.set('ownerUUID', value, (v) {});
_sqliteStorage.set('fre_ownerUUID', value, (v) {});
}
String _cliName = '';
String get cliName => _cliName;
set cliName(String value) {
_cliName = value;
_sqliteStorage.set('cliName', value, (v) {});
_sqliteStorage.set('fre_cliName', value, (v) {});
}
String _petAmountRegister = '';
String get petAmountRegister => _petAmountRegister;
set petAmountRegister(String value) {
_petAmountRegister = value;
_sqliteStorage.set('petAmountRegister', value, (v) {});
_sqliteStorage.set('fre_petAmountRegister', value, (v) {});
}
bool _whatsapp = false;
bool get whatsapp => _whatsapp;
set whatsapp(bool value) {
_whatsapp = value;
_sqliteStorage.set('whatsapp', value, (v) {});
_sqliteStorage.set('fre_whatsapp', value, (v) {});
}
bool _provisional = false;
bool get provisional => _provisional;
set provisional(bool value) {
_provisional = value;
_sqliteStorage.set('provisional', value, (v) {});
_sqliteStorage.set('fre_provisional', value, (v) {});
}
bool _pets = false;
bool get pets => _pets;
set pets(bool value) {
_pets = value;
_sqliteStorage.set('pets', value, (v) {});
_sqliteStorage.set('fre_pets', value, (v) {});
}
bool _local = false;
bool get local => _local;
set local(bool value) {
_local = value;
_sqliteStorage.set('local', value, (v) {});
_sqliteStorage.set('fre_local', value, (v) {});
}
bool _notify = false;
bool get notify => _notify;
set notify(bool value) {
_notify = value;
_sqliteStorage.set('notify', value, (v) {});
_sqliteStorage.set('fre_notify', value, (v) {});
}
bool _fingerprint = false;
bool get fingerprint => _fingerprint;
set fingerprint(bool value) {
_fingerprint = value;
_sqliteStorage.set('fingerprint', value, (v) {});
_sqliteStorage.set('fre_fingerprint', value, (v) {});
}
bool _access = false;
bool get access => _access;
set access(bool value) {
_access = value;
_sqliteStorage.set('access', value, (v) {});
_sqliteStorage.set('fre_access', value, (v) {});
}
bool _panic = false;
bool get panic => _panic;
set panic(bool value) {
_panic = value;
_sqliteStorage.set('panic', value, (v) {});
_sqliteStorage.set('fre_panic', value, (v) {});
}
bool _person = false;
bool get person => _person;
set person(bool value) {
_person = value;
_sqliteStorage.set('person', value, (v) {});
_sqliteStorage.set('fre_person', value, (v) {});
}
bool _requestOSnotification = false;
bool get requestOSnotification => _requestOSnotification;
set requestOSnotification(bool value) {
_requestOSnotification = value;
_sqliteStorage.set('requestOSnotification', value, (v) {});
_sqliteStorage.set('fre_requestOSnotification', value, (v) {});
}
String get createdAt => '0000-00-00 00:00:00';

2
log
View File

@ -1,2 +0,0 @@
[log] Error initializing notification manager: 'package:flutter_local_notifications/src/platform_flutter_local_notifications.dart': Failed assertion: line 1033 pos 12: 'callback != null': The backgroundHandler needs to be either a static function or a top
level function to be accessible as a Flutter entry point.

View File

@ -61,10 +61,10 @@ packages:
dependency: transitive
description:
name: args
sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6
url: "https://pub.dev"
source: hosted
version: "2.5.0"
version: "2.6.0"
async:
dependency: transitive
description:
@ -85,10 +85,10 @@ packages:
dependency: "direct main"
description:
name: awesome_notifications
sha256: d9e46ce7f5171ee1e9b1c5bc6dc40bd77528561f592842ce97ce3a0a9ae155ef
sha256: d051ffb694a53da216ff13d02c8ec645d75320048262f7e6b3c1d95a4f54c902
url: "https://pub.dev"
source: hosted
version: "0.9.3+1"
version: "0.10.0"
barcode:
dependency: transitive
description:
@ -157,18 +157,18 @@ packages:
dependency: transitive
description:
name: camera_android_camerax
sha256: "59a01443c280cf969449f4b72db9396e80e5a9e8f07a2500a042906a157ce894"
sha256: e3627fdc2132d89212b8a8676679f5b07008c7e3d8ae00cea775c3397f9e742b
url: "https://pub.dev"
source: hosted
version: "0.6.9+2"
version: "0.6.10"
camera_avfoundation:
dependency: transitive
description:
name: camera_avfoundation
sha256: "7c28969a975a7eb2349bc2cb2dfe3ad218a33dba9968ecfb181ce08c87486655"
sha256: "0d04cec8715b59fb6dc60eefb47e69024f51233c570e475b886dc9290568bca7"
url: "https://pub.dev"
source: hosted
version: "0.9.17+3"
version: "0.9.17+4"
camera_platform_interface:
dependency: transitive
description:
@ -636,10 +636,10 @@ packages:
dependency: "direct main"
description:
name: flutter_riverpod
sha256: "0f1974eff5bbe774bf1d870e406fc6f29e3d6f1c46bd9c58e7172ff68a785d7d"
sha256: "711d916456563f715bde1e139d7cfdca009f8264befab3ac9f8ded8b6ec26405"
url: "https://pub.dev"
source: hosted
version: "2.5.1"
version: "2.5.3"
flutter_secure_storage:
dependency: "direct main"
description:
@ -835,10 +835,10 @@ packages:
dependency: "direct main"
description:
name: image_picker_android
sha256: d3e5e00fdfeca8fd4ffb3227001264d449cc8950414c2ff70b0e06b9c628e643
sha256: d34e0d9e024e81321b2aeed7b202ec6181cc282e6a1c0c0b4e6ad07ef1065d82
url: "https://pub.dev"
source: hosted
version: "0.8.12+15"
version: "0.8.12+16"
image_picker_for_web:
dependency: "direct main"
description:
@ -851,10 +851,10 @@ packages:
dependency: "direct main"
description:
name: image_picker_ios
sha256: "6703696ad49f5c3c8356d576d7ace84d1faf459afb07accbb0fae780753ff447"
sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b"
url: "https://pub.dev"
source: hosted
version: "0.8.12"
version: "0.8.12+1"
image_picker_linux:
dependency: transitive
description:
@ -1304,10 +1304,10 @@ packages:
dependency: transitive
description:
name: riverpod
sha256: f21b32ffd26a36555e501b04f4a5dca43ed59e16343f1a30c13632b2351dfa4d
sha256: c86fedfb45dd1da98ee6493dd9374325cdf494e7d523ebfb0c387eecc5f7b5c9
url: "https://pub.dev"
source: hosted
version: "2.5.1"
version: "2.5.3"
rxdart:
dependency: "direct main"
description:
@ -1328,10 +1328,10 @@ packages:
dependency: transitive
description:
name: share_plus_platform_interface
sha256: "6ababf341050edff57da8b6990f11f4e99eaba837865e2e6defe16d039619db5"
sha256: c57c0bbfec7142e3a0f55633be504b796af72e60e3c791b44d5a017b985f7a48
url: "https://pub.dev"
source: hosted
version: "5.0.0"
version: "5.0.1"
shared_preferences:
dependency: "direct main"
description:
@ -1669,18 +1669,18 @@ packages:
dependency: "direct main"
description:
name: webview_flutter
sha256: ec81f57aa1611f8ebecf1d2259da4ef052281cb5ad624131c93546c79ccc7736
sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec"
url: "https://pub.dev"
source: hosted
version: "4.9.0"
version: "4.10.0"
webview_flutter_android:
dependency: transitive
description:
name: webview_flutter_android
sha256: "47a8da40d02befda5b151a26dba71f47df471cddd91dfdb7802d0a87c5442558"
sha256: "74693a212d990b32e0b7055d27db973a18abf31c53942063948cdfaaef9787ba"
url: "https://pub.dev"
source: hosted
version: "3.16.9"
version: "4.0.0"
webview_flutter_platform_interface:
dependency: transitive
description:

View File

@ -55,7 +55,7 @@ dependencies:
image_picker_android: ^0.8.12+15
image_picker_for_web: ^3.0.5
persistent_bottom_nav_bar: ^6.2.1
image_picker_ios: 0.8.12
image_picker_ios: ^0.8.12+1
image_picker_platform_interface: 2.10.0
local_auth: ^2.2.0
intl: ^0.19.0
@ -97,7 +97,7 @@ dependencies:
qr_flutter: ^4.1.0
permission_handler: ^11.3.1
firebase_crashlytics: ^4.0.1
awesome_notifications: ^0.9.3+1
awesome_notifications: ^0.10.0
app_tracking_transparency: ^2.0.6
dio: ^5.7.0
crypto: ^3.0.5