From 937aebaf4128965d2d91b77bd45b48cca5a835cf Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Fri, 24 Jan 2025 17:09:13 -0300 Subject: [PATCH] impl PatrolTest para ForgotPassword --- android/gradle.properties | 2 +- integration_test/app_test.dart | 49 +- integration_test/auth_test.dart | 106 +-- integration_test/common.dart | 31 + integration_test/locals_test.dart | 30 +- integration_test/menu_test.dart | 36 +- integration_test/module_test.dart | 20 +- integration_test/test_bundle.dart | 6 +- integration_test/utils_test.dart | 86 +- integration_test/welcome_test.dart | 13 +- ...ot_password_template_component_widget.dart | 119 +-- .../sign_in_template_component_widget.dart | 839 +++++------------- .../notification/deep_link_service.dart | 9 +- .../notification/notification_service.dart | 5 +- lib/flutter_flow/nav/nav.dart | 152 +--- .../forgot_password_screen.dart | 112 +-- pubspec.lock | 72 +- scripts/test.ps1 | 3 + scripts/test.sh | 3 + 19 files changed, 656 insertions(+), 1037 deletions(-) create mode 100644 integration_test/common.dart create mode 100644 scripts/test.ps1 create mode 100644 scripts/test.sh diff --git a/android/gradle.properties b/android/gradle.properties index d1327d41..d697d418 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx4608m android.useAndroidX=true android.enableJetifier=true -android.enableR8=true +# android.enableR8=true enableProguardInReleaseBuilds = true diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart index da88df3f..239f2e4a 100644 --- a/integration_test/app_test.dart +++ b/integration_test/app_test.dart @@ -1,6 +1,10 @@ import 'dart:collection'; import 'dart:math'; +import 'package:app_tracking_transparency/app_tracking_transparency.dart'; +import 'package:firebase_core/firebase_core.dart'; +import 'package:firebase_crashlytics/firebase_crashlytics.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -8,22 +12,32 @@ import 'package:go_router/go_router.dart'; import 'package:hub/components/molecular_components/throw_exception/throw_exception_widget.dart'; import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart'; import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart'; +import 'package:hub/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart'; import 'package:hub/features/backend/api_requests/index.dart'; import 'package:hub/features/local/index.dart'; import 'package:hub/features/menu/index.dart'; import 'package:hub/features/module/data/index.dart'; import 'package:hub/features/module/domain/index.dart'; +import 'package:hub/features/notification/index.dart'; import 'package:hub/features/storage/index.dart'; import 'package:hub/flutter_flow/index.dart' as ff; +import 'package:hub/flutter_flow/index.dart'; import 'package:hub/initialization.dart'; import 'package:hub/main.dart'; +import 'package:hub/pages/forgot_password_page/forgot_password_screen.dart'; import 'package:integration_test/integration_test.dart'; import 'package:material_symbols_icons/symbols.dart'; -import 'package:patrol_finders/patrol_finders.dart'; +import 'package:patrol/patrol.dart'; +import 'package:flutter_web_plugins/url_strategy.dart'; +import 'app_test.dart'; import 'fuzzer/fuzzer.dart'; +export 'package:flutter_test/flutter_test.dart'; +export 'package:patrol/patrol.dart'; + part 'auth_test.dart'; +part 'common.dart'; part 'home_test.dart'; part 'locals_test.dart'; part 'menu_test.dart'; @@ -36,29 +50,30 @@ part 'storage_test.dart'; part 'utils_test.dart'; part 'welcome_test.dart'; -late PatrolTester $; +late PatrolIntegrationTester $; void main() { //init integration test - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + // IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - setUp(() async {}); - tearDown(() async {}); + // setUp(() async {}); + // tearDown(() async {}); - WelcomeTest.signInToSignUp(); - WelcomeTest.signUpToSignIn(); + // WelcomeTest.signInToSignUp(); + // WelcomeTest.signUpToSignIn(); - AuthenticationTest.signIn(); - AuthenticationTest.signUp(); - AuthenticationTest.signOut(); + // AuthenticationTest.signIn(); + // AuthenticationTest.signUp(); + // AuthenticationTest.signOut(); + AuthenticationTest.recovery(); - ModularizationTest.switchLicense(); - ModularizationTest.containLicense(); + // ModularizationTest.switchLicense(); + // ModularizationTest.containLicense(); - MenuTest.navToEntries(); - MenuTest.containEntries(); - MenuTest.labels2AppbarConsistency(); + // MenuTest.navToEntries(); + // MenuTest.containEntries(); + // MenuTest.labels2AppbarConsistency(); - LocalsTest.setLocal(); - LocalsTest.unlinkLocal(); + // LocalsTest.setLocal(); + // LocalsTest.unlinkLocal(); } diff --git a/integration_test/auth_test.dart b/integration_test/auth_test.dart index 0b9ca1ea..e18a3916 100644 --- a/integration_test/auth_test.dart +++ b/integration_test/auth_test.dart @@ -2,12 +2,11 @@ part of 'app_test.dart'; class AuthenticationTest { static Future signIn() async { - patrolWidgetTest( + patrol( 'Sign-In with fuzzed emails', - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; - $.tester - .printToConsole('Authentication Test - Sign-In with fuzzed emails'); + $.tester.printToConsole('Authentication Test - Sign-In with fuzzed emails'); final PatrolFinder throwsException = $(Dialog).$(ThrowExceptionWidget); final Fuzzer fuzzer = Fuzzer( @@ -33,8 +32,7 @@ class AuthenticationTest { ], iterations: 2, ); - Map concat( - String username, String domain, String password) { + Map concat(String username, String domain, String password) { return { 'emailTextFormField': '${username}@${domain}.test', 'passwordTextFormField': password, @@ -43,7 +41,7 @@ class AuthenticationTest { final credentials = fuzzer.fuzz(concat); - await _unlogged(); + await _unlogged($); await $.pumpWidgetAndSettle(const App()); await _navigateToSignIn($); @@ -59,12 +57,11 @@ class AuthenticationTest { }, ); - patrolWidgetTest( + patrol( 'Sign-In with email_app@exemplo.com', - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; - $.tester.printToConsole( - 'Authentication Test - Sign-In with email_app@exemplo.com'); + $.tester.printToConsole('Authentication Test - Sign-In with email_app@exemplo.com'); final PatrolFinder throwsException = $(Dialog).$(ThrowExceptionWidget); final Map credentials = { @@ -72,7 +69,7 @@ class AuthenticationTest { 'passwordTextFormField': '12345678', }; - await _unlogged(); + await _unlogged($); await $.pumpWidgetAndSettle(const App()); await _navigateToSignIn($); await _auth(credentials, $, throwsException); @@ -81,12 +78,11 @@ class AuthenticationTest { } static Future signUp() async { - patrolWidgetTest( + patrol( 'Sign Up - credenciais já registradas', - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; - $.tester.printToConsole( - 'Authentication Test - Sign-Up: credenciais já registradas'); + $.tester.printToConsole('Authentication Test - Sign-Up: credenciais já registradas'); final PatrolFinder throwsException = $(Dialog).$(ThrowExceptionWidget); final Map credentials = { @@ -94,7 +90,7 @@ class AuthenticationTest { 'emailTextFormField': 'email_app@exemplo.com', 'passwordTextFormField': '12345678', }; - await _unlogged(); + await _unlogged($); await $.pumpWidgetAndSettle(const App()); await _navigateToSignUp($); await _auth(credentials, $, throwsException); @@ -102,12 +98,11 @@ class AuthenticationTest { }, ); - patrolWidgetTest( + patrol( 'Sign Up - credenciais novas', - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; - $.tester - .printToConsole('Authentication Test - Sign-Up: credenciais novas'); + $.tester.printToConsole('Authentication Test - Sign-Up: credenciais novas'); final PatrolFinder throwsException = $(Dialog).$(ThrowExceptionWidget); @@ -140,8 +135,7 @@ class AuthenticationTest { ], iterations: 2, ); - Map concat( - String name, String username, String domain, String password) { + Map concat(String name, String username, String domain, String password) { return { 'nameTextFormField': name, 'emailTextFormField': '${username}@${domain}.test', @@ -151,7 +145,7 @@ class AuthenticationTest { final credentials = fuzzer.fuzz(concat); - await _unlogged(); + await _unlogged($); await $.pumpWidgetAndSettle(const App()); @@ -170,62 +164,54 @@ class AuthenticationTest { } static Future signOut() async { - patrolWidgetTest( + patrol( 'Deslogar da Conta', - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; - $.tester.printToConsole( - 'Authentication Test - Sign-Out: Deslogar da Conta'); + $.tester.printToConsole('Authentication Test - Sign-Out: Deslogar da Conta'); - await _loggedWithMultiLocalsAccount(); + await _loggedWithMultiLocalsAccount($); await $.pumpWidget(const App()); await $.waitUntilVisible($(MenuStaggeredView)); - await $(Icons.menu_rounded) // - .waitUntilVisible() - .tap(); + await $(Icons.menu_rounded).waitUntilVisible().tap(); await $.waitUntilVisible($(MenuListView)); - await $(Icons.exit_to_app) - .waitUntilVisible() - .tap(settlePolicy: SettlePolicy.trySettle); + await $(Icons.exit_to_app).waitUntilVisible().tap(settlePolicy: SettlePolicy.trySettle); await Future.delayed(const Duration(milliseconds: 500)); }, ); } - static Future recovery() async { - patrolWidgetTest( - 'ForgotPassword', - (PatrolTester tester) async { - $ = tester; - $.tester - .printToConsole('Authentication Test - ForgotPassword'); - final PatrolFinder throwsException = $(Dialog).$(ThrowExceptionWidget); + static void recovery() async { + patrol('Open url in the app', ($) async { + await _loggedWithMultiLocalsAccount($); + await $.pumpWidget(const App()); + await $.waitUntilVisible($(MenuStaggeredView)); + // await $.native.pressHome(); + // final String browserId = 'com.android.chrome'; + // await $.native.openApp(appId: browserId); + await $.native.openUrl(// + 'https://freaccess.com.br/freaccess/alterarSenha.php?email=freaccesshub@gmail.com&token=67939240e12c31.10412525'); - final credentials = { - 'emailTextFormField': 'email_app@exemplo.com', - - }; - - await _unlogged(); - await $.pumpWidgetAndSettle(const App()); - await _navigateToSignIn($); - await _auth(credentials, $, throwsException); - - }, - ); + await $.pumpAndSettle(); + Future.delayed(Duration(seconds: 3)); + await $.pump(Duration(seconds: 3)); + await $.pumpAndSettle(); + final PatrolFinder forgotPassword = await $(#ForgotPasswordScreen).waitUntilVisible(); + expect(forgotPassword, findsOneWidget); + }); } } Future _auth( Map credentials, - PatrolTester $, + PatrolIntegrationTester $, PatrolFinder throwsException, ) async { await _enterCredentials(credentials, $); @@ -234,7 +220,7 @@ Future _auth( Future _enterCredentials( Map credentials, - PatrolTester $, + PatrolIntegrationTester $, ) async { for (var entry in credentials.entries) { await $(ValueKey(entry.key)) // @@ -244,8 +230,7 @@ Future _enterCredentials( } } -Future _submit( - String key, PatrolTester $, PatrolFinder throwsException) async { +Future _submit(String key, PatrolIntegrationTester $, PatrolFinder throwsException) async { await $(ValueKey(key)) // .waitUntilVisible() .tap(); @@ -263,6 +248,5 @@ Future _submit( String _generateRandomString(int length) { const chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; final rand = Random(); - return List.generate(length, (index) => chars[rand.nextInt(chars.length)]) - .join(); + return List.generate(length, (index) => chars[rand.nextInt(chars.length)]).join(); } diff --git a/integration_test/common.dart b/integration_test/common.dart new file mode 100644 index 00000000..87825994 --- /dev/null +++ b/integration_test/common.dart @@ -0,0 +1,31 @@ +part of 'app_test.dart'; + +final _patrolTesterConfig = PatrolTesterConfig(printLogs: true); +final _nativeAutomatorConfig = NativeAutomatorConfig( + findTimeout: Duration(seconds: 20), // 10 seconds is too short for some CIs +); + +// Future createApp(PatrolIntegrationTester $) async { +// await app_main.main(); +// await $.pumpAndSettle(); +// } + +void patrol( + String description, + Future Function(PatrolIntegrationTester) callback, { + bool? skip, + List tags = const [], + NativeAutomatorConfig? nativeAutomatorConfig, + LiveTestWidgetsFlutterBindingFramePolicy framePolicy = + LiveTestWidgetsFlutterBindingFramePolicy.fadePointers, +}) { + patrolTest( + description, + config: _patrolTesterConfig, + nativeAutomatorConfig: nativeAutomatorConfig ?? _nativeAutomatorConfig, + framePolicy: framePolicy, + skip: skip, + callback, + tags: tags, + ); +} diff --git a/integration_test/locals_test.dart b/integration_test/locals_test.dart index e2e605c9..50c9cb3c 100644 --- a/integration_test/locals_test.dart +++ b/integration_test/locals_test.dart @@ -46,13 +46,13 @@ class LocalsTest { // } // }, // ); - patrolWidgetTest( + patrol( 'Selecionar um local disponível com somente um local disponivel', // - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; $.tester.printToConsole('Locals Test - Selecionar um local disponível'); - await _loggedWithSomeoneLocalAccount(false); + await _loggedWithSomeoneLocalAccount($, false); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(LocalProfileComponentWidget)); @@ -184,14 +184,14 @@ class LocalsTest { // // } // }, // ); - patrolWidgetTest( + patrol( 'Desvincular do local selecionado com somente um local disponivel', // - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; $.tester.printToConsole( 'Locals Test - Desvincular do local selecionado com multiplos locais disponiveis'); - await _loggedWithSomeoneLocalAccount(); + await _loggedWithSomeoneLocalAccount($); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -247,13 +247,13 @@ class LocalsTest { expect(entriesFinder, findsWidgets); }); - patrolWidgetTest( + patrol( 'Vincular um local desvinculado com somente um local disponivel', // - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; $.tester.printToConsole('Locals Test - Vincular um local desvinculado'); - await _loggedWithSomeoneLocalAccount(false); + await _loggedWithSomeoneLocalAccount($, false); await $.pumpWidget(const App()); final PatrolFinder bottomSheetFinder = @@ -302,11 +302,11 @@ class LocalsTest { } static Future attachLocal() async { - patrolWidgetTest( + patrol( 'Selecionar um local disponível com multíplos locais disponíveis', // - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; - await _loggedWithMultiLocalsAccount(); + await _loggedWithMultiLocalsAccount($); await $.pumpWidget(const App()); late Map credentials; final PatrolFinder throwsException = $(''); @@ -337,11 +337,11 @@ class LocalsTest { return; }, ); - patrolWidgetTest( + patrol( 'Selecionar um local disponível com somente um local disponível', // - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; - await _loggedWithSomeoneLocalAccount(); + await _loggedWithSomeoneLocalAccount($); await $.pumpWidget(const App()); late Map credentials; final PatrolFinder throwsException = $(''); diff --git a/integration_test/menu_test.dart b/integration_test/menu_test.dart index 10b0ab62..1dd315d1 100644 --- a/integration_test/menu_test.dart +++ b/integration_test/menu_test.dart @@ -2,15 +2,15 @@ part of 'app_test.dart'; class MenuTest { static Future labels2AppbarConsistency() async { - patrolWidgetTest( + patrol( 'As labels dos menuItems correspondem aos títulos das AppBars? (MultiLocais)', // - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; $.tester.printToConsole( 'Menu Test - As labels dos menuItems correspondem aos títulos das AppBars?'); - await _loggedWithMultiLocalsAccount(); + await _loggedWithMultiLocalsAccount($); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -96,13 +96,13 @@ class MenuTest { } static Future containEntries() async { - patrolWidgetTest( + patrol( 'HomeMenu contém seus itens? (MultiLocais)', // - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; $.tester.printToConsole('Menu Test - HomeMenu contém seus itens?'); - await _loggedWithMultiLocalsAccount(); + await _loggedWithMultiLocalsAccount($); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -135,13 +135,13 @@ class MenuTest { expect(entriesKey, containsAll(menuKeys)); }, ); - patrolWidgetTest( + patrol( 'HomeMenu contém seus itens? (MonoLocal)', // - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; $.tester.printToConsole('Menu Test - HomeMenu contém seus itens?'); - await _loggedWithSomeoneLocalAccount(); + await _loggedWithSomeoneLocalAccount($); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -175,13 +175,13 @@ class MenuTest { }, ); - patrolWidgetTest( + patrol( 'DrawerMenu contém seus itens? (MultiLocais)', // - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; $.tester.printToConsole('Menu Test - DrawerMenu contém seus itens?'); - await _loggedWithMultiLocalsAccount(); + await _loggedWithMultiLocalsAccount($); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -222,13 +222,13 @@ class MenuTest { await Future.delayed(const Duration(milliseconds: 500)); }, ); - patrolWidgetTest( + patrol( 'DrawerMenu contém seus itens? (MonoLocal)', // - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; $.tester.printToConsole('Menu Test - DrawerMenu contém seus itens?'); - await _loggedWithSomeoneLocalAccount(); + await _loggedWithSomeoneLocalAccount($); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -272,13 +272,13 @@ class MenuTest { } static Future navToEntries() async { - patrolWidgetTest( + patrol( 'Navegação entre items do Menu (MultiLocais)', - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; $.tester.printToConsole('Menu Test - Navegação entre items do Menu'); - await _loggedWithMultiLocalsAccount(); + await _loggedWithMultiLocalsAccount($); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); diff --git a/integration_test/module_test.dart b/integration_test/module_test.dart index 6377e474..80c0aa4b 100644 --- a/integration_test/module_test.dart +++ b/integration_test/module_test.dart @@ -2,14 +2,13 @@ part of 'app_test.dart'; class ModularizationTest { static Future containLicense() async { - patrolWidgetTest( - 'Os modulos de licença está sendo processados? (MultiLocais)', - (PatrolTester tester) async { + patrol('Os modulos de licença está sendo processados? (MultiLocais)', + (PatrolIntegrationTester tester) async { $ = tester; $.tester.printToConsole( 'Modularization Test - Os modulos de licença está sendo processados?'); - await _loggedWithMultiLocalsAccount(); + await _loggedWithMultiLocalsAccount($); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -28,14 +27,13 @@ class ModularizationTest { return; }); - patrolWidgetTest( - 'Os modulos de licença está sendo processados? (MonoLocal)', - (PatrolTester tester) async { + patrol('Os modulos de licença está sendo processados? (MonoLocal)', + (PatrolIntegrationTester tester) async { $ = tester; $.tester.printToConsole( 'Modularization Test - Os modulos de licença está sendo processados?'); - await _loggedWithSomeoneLocalAccount(); + await _loggedWithSomeoneLocalAccount($); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -57,13 +55,13 @@ class ModularizationTest { } static Future switchLicense() async { - patrolWidgetTest( + patrol( 'Licença está sendo atualizada?', - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; $.tester.printToConsole('Licença está sendo atualizada?'); - await _loggedWithMultiLocalsAccount(); + await _loggedWithMultiLocalsAccount($); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); diff --git a/integration_test/test_bundle.dart b/integration_test/test_bundle.dart index 32287821..52ae7570 100644 --- a/integration_test/test_bundle.dart +++ b/integration_test/test_bundle.dart @@ -9,7 +9,7 @@ import 'package:patrol/src/native/contracts/contracts.dart'; import 'package:test_api/src/backend/invoker.dart'; // START: GENERATED TEST IMPORTS -import 'app_test.dart' as app_test; +import 'app_test.dart' as __app_test; // END: GENERATED TEST IMPORTS Future main() async { @@ -31,7 +31,7 @@ Future main() async { // When running on iOS, the native side of Patrol (specifically: the // PATROL_INTEGRATION_TEST_IOS_RUNNER macro) makes an initial run to gather // the tests that it will later run (same as the Android). During that initial - // run, it makes an RPC call to PatrolAppSevice and asks it for Dart tests. + // run, it makes an RPC call to PatrolAppService and asks it for Dart tests. // // Once the native runner has the list of Dart tests, it dynamically creates // native test cases from them. On Android, this is done using the @@ -69,7 +69,7 @@ Future main() async { }); // START: GENERATED TEST GROUPS - group('app_test', app_test.main); + group('.app_test', __app_test.main); // END: GENERATED TEST GROUPS final dartTestGroup = await testExplorationCompleter.future; diff --git a/integration_test/utils_test.dart b/integration_test/utils_test.dart index 144aa4ad..309c0923 100644 --- a/integration_test/utils_test.dart +++ b/integration_test/utils_test.dart @@ -1,8 +1,8 @@ part of 'app_test.dart'; -Future _loggedWithMultiLocalsAccount( +Future _loggedWithMultiLocalsAccount(PatrolIntegrationTester $, [bool forceLinkedLocal = true]) async { - await initializeApp(); + await _init($); await StorageHelper() // .set(SecureStorageKey.isLogged.value, 'true'); await StorageHelper() // @@ -29,9 +29,9 @@ Future _loggedWithMultiLocalsAccount( } } -Future _loggedWithSomeoneLocalAccount( +Future _loggedWithSomeoneLocalAccount(PatrolIntegrationTester $, [bool forceLinkedLocal = true]) async { - await initializeApp(); + await _init($); await StorageHelper() // .set(SecureStorageKey.isLogged.value, 'true'); await StorageHelper() // @@ -58,8 +58,8 @@ Future _loggedWithSomeoneLocalAccount( } } -Future _unlogged() async { - await initializeApp(); +Future _unlogged(PatrolIntegrationTester $) async { + await _init($); await StorageHelper() // .set(SecureStorageKey.isLogged.value, 'false'); await StorageHelper() // @@ -78,12 +78,24 @@ Future _unlogged() async { .set(LocalsStorageKey.isNewVersion.key, true); } -Future _navigateToSignIn(PatrolTester $) async { +Future _init(PatrolIntegrationTester $) async { + WidgetsFlutterBinding.ensureInitialized(); + await _initializeTracking(); + await _initializeStorage(); + await _initializeFirebase(); + await _initializeNotificationService(); + _initializeUrlStrategy(); + _initializeSystemSettings(); + await _initializeFlutterFlow(); + await _initializeNav(); +} + +Future _navigateToSignIn(PatrolIntegrationTester $) async { final signInButton = $(#toggleSignInPage).waitUntilVisible(); await signInButton.tap(); } -Future _navigateToSignUp(PatrolTester $) async { +Future _navigateToSignUp(PatrolIntegrationTester $) async { final signUpButton = $(#toggleSignUpPage).waitUntilVisible(); await signUpButton.tap(); } @@ -91,3 +103,61 @@ Future _navigateToSignUp(PatrolTester $) async { Future _navigateBackUsingSystemGesture() async => IntegrationTestWidgetsFlutterBinding.instance.keyboard .isLogicalKeyPressed(LogicalKeyboardKey.escape); + +Future _initializeTracking() async { + print('Requesting tracking authorization...'); + await AppTrackingTransparency.requestTrackingAuthorization(); + print('Tracking authorization requested'); +} + +Future _initializeFirebase() async { + print('Initializing Firebase...'); + await Firebase.initializeApp(); + print('Firebase initialized'); +} + +Future _initializeNotificationService() async { + print('Initializing Notification Service...'); + await NotificationService.initialize(false); + + print('Notification Service initialized'); +} + +void _initializeUrlStrategy() { + print('Initializing URL Strategy...'); + setUrlStrategy(PathUrlStrategy()); + print('URL Strategy initialized'); +} + +void _initializeSystemSettings() { + print('Initializing System Settings...'); + SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); + if (kDebugMode) { + print('Debug mode'); + } else { + final crashlyticsInstance = FirebaseCrashlytics.instance; + print('Release mode'); + if (crashlyticsInstance.isCrashlyticsCollectionEnabled) { + FlutterError.onError = crashlyticsInstance.recordFlutterError; + print('Crashlytics enabled'); + } + } +} + +Future _initializeFlutterFlow() async { + print('Initializing FlutterFlow...'); + await FlutterFlowTheme.initialize(); + await FFLocalizations.initialize(); + print('FlutterFlow initialized'); +} + +Future _initializeNav() async { + print('Initializing Nav...'); + GoRouter.optionURLReflectsImperativeAPIs = true; + usePathUrlStrategy(); + print('Nav initialized'); +} + +Future _initializeStorage() async { + await StorageHelper().init(); +} diff --git a/integration_test/welcome_test.dart b/integration_test/welcome_test.dart index c384d771..29c308c8 100644 --- a/integration_test/welcome_test.dart +++ b/integration_test/welcome_test.dart @@ -2,13 +2,14 @@ part of 'app_test.dart'; class WelcomeTest { static Future signInToSignUp() async { - patrolWidgetTest( + patrol( 'Sign-In to Sign-Up', - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; $.tester.printToConsole('Welcome Test - Sign-In to Sign-Up'); - await _unlogged(); + await _unlogged($); await $.pumpWidgetAndSettle(const App()); + await _navigateToSignIn($); await _navigateToSignUp($); }, @@ -16,12 +17,12 @@ class WelcomeTest { } static Future signUpToSignIn() async { - patrolWidgetTest( + patrol( 'Sign-Up to Sign-In', - (PatrolTester tester) async { + (PatrolIntegrationTester tester) async { $ = tester; $.tester.printToConsole('Welcome Test - Sign-Up to Sign-In'); - await _unlogged(); + await _unlogged($); await $.pumpWidgetAndSettle(const App()); await _navigateToSignUp($); await _navigateToSignIn($); diff --git a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart index d9797e17..62e99c23 100644 --- a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart +++ b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart @@ -19,12 +19,10 @@ class ForgotPasswordTemplateComponentWidget extends StatefulWidget { const ForgotPasswordTemplateComponentWidget({super.key}); @override - State createState() => - _ForgotPasswordTemplateComponentWidgetState(); + State createState() => _ForgotPasswordTemplateComponentWidgetState(); } -class _ForgotPasswordTemplateComponentWidgetState - extends State { +class _ForgotPasswordTemplateComponentWidgetState extends State { late ForgotPasswordTemplateComponentModel _model; @override @@ -51,13 +49,12 @@ class _ForgotPasswordTemplateComponentWidgetState @override Widget build(BuildContext context) { - double limitedSubHeaderFontSize = - LimitedFontSizeUtil.getSubHeaderFontSize(context); + double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context); double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); - double limitedHeaderFontSize = - LimitedFontSizeUtil.getHeaderFontSize(context); + double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context); return Align( + key: ValueKey('ForgotPasswordTemplateComponentWidget'), alignment: const AlignmentDirectional(0.0, 1.0), child: SingleChildScrollView( child: Container( @@ -87,8 +84,7 @@ class _ForgotPasswordTemplateComponentWidgetState tablet: false, )) Padding( - padding: const EdgeInsetsDirectional.fromSTEB( - 16.0, 0.0, 16.0, 8.0), + padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0), child: InkWell( key: const ValueKey('BackButton'), splashColor: Colors.transparent, @@ -102,8 +98,7 @@ class _ForgotPasswordTemplateComponentWidgetState mainAxisSize: MainAxisSize.max, children: [ const Padding( - padding: EdgeInsetsDirectional.fromSTEB( - 0.0, 12.0, 0.0, 12.0), + padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0), child: Icon( Icons.arrow_back_rounded, color: Color(0xFF15161E), @@ -111,20 +106,16 @@ class _ForgotPasswordTemplateComponentWidgetState ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB( - 12.0, 0.0, 0.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0), child: Text( '', - style: FlutterFlowTheme.of(context) - .bodyMedium - .override( + style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: 'Plus Jakarta Sans', color: const Color(0xFF15161E), fontSize: limitedHeaderFontSize, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap() - .containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), ), ), ), @@ -133,36 +124,30 @@ class _ForgotPasswordTemplateComponentWidgetState ), ), Padding( - padding: - const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0), child: Text( - FFLocalizations.of(context) - .getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */), + FFLocalizations.of(context).getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */), style: FlutterFlowTheme.of(context).headlineMedium.override( fontFamily: 'Outfit', color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedHeaderFontSize, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: - GoogleFonts.asMap().containsKey('Outfit'), + useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'), ), ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB( - 16.0, 4.0, 16.0, 4.0), + padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0), child: Text( - FFLocalizations.of(context).getText( - 'wu2f7yzo' /* Não se preucupe nós vamos te a... */), + FFLocalizations.of(context).getText('wu2f7yzo' /* Não se preucupe nós vamos te a... */), style: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: 'Plus Jakarta Sans', color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedSubHeaderFontSize, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap() - .containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), ), ), ), @@ -170,8 +155,7 @@ class _ForgotPasswordTemplateComponentWidgetState key: _model.formKey, autovalidateMode: AutovalidateMode.onUserInteraction, child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB( - 16.0, 12.0, 16.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0), child: SizedBox( width: double.infinity, child: TextFormField( @@ -188,18 +172,15 @@ class _ForgotPasswordTemplateComponentWidgetState obscureText: false, decoration: InputDecoration( isDense: true, - labelText: FFLocalizations.of(context) - .getText('mtz8l7ft' /* E-mail */), - labelStyle: - FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primary, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap() - .containsKey('Plus Jakarta Sans'), - ), + labelText: FFLocalizations.of(context).getText('mtz8l7ft' /* E-mail */), + labelStyle: FlutterFlowTheme.of(context).labelMedium.override( + fontFamily: 'Plus Jakarta Sans', + color: FlutterFlowTheme.of(context).primary, + fontSize: limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: FontWeight.w500, + useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + ), enabledBorder: OutlineInputBorder( borderSide: const BorderSide( color: Colors.black, @@ -228,8 +209,7 @@ class _ForgotPasswordTemplateComponentWidgetState ), borderRadius: BorderRadius.circular(12.0), ), - contentPadding: const EdgeInsetsDirectional.fromSTEB( - 24.0, 24.0, 20.0, 24.0), + contentPadding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0), suffixIcon: Icon( Icons.email, color: FlutterFlowTheme.of(context).primary, @@ -242,14 +222,12 @@ class _ForgotPasswordTemplateComponentWidgetState fontSize: limitedInputFontSize, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap() - .containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), ), maxLines: null, keyboardType: TextInputType.emailAddress, cursorColor: FlutterFlowTheme.of(context).primary, - validator: _model.emailAddressTextControllerValidator - .asValidator(context), + validator: _model.emailAddressTextControllerValidator.asValidator(context), ), ), ), @@ -257,17 +235,13 @@ class _ForgotPasswordTemplateComponentWidgetState Align( alignment: const AlignmentDirectional(0.0, 0.0), child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB( - 0.0, 24.0, 0.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0), child: FFButtonWidget( key: const ValueKey('SendButtonWidget'), - onPressed: (_model.emailAddressTextController.text == - '' || - !ValidatorUtil.isValidEmail( - _model.emailAddressTextController.text)) + onPressed: (_model.emailAddressTextController.text == '' || + !ValidatorUtil.isValidEmail(_model.emailAddressTextController.text)) ? null - : () async => - await AuthenticationService.forgotPassword( + : () async => await AuthenticationService.forgotPassword( context, _model.emailAddressTextController.text, ).then((v) => v == true ? context.pop() : null), @@ -277,28 +251,23 @@ class _ForgotPasswordTemplateComponentWidgetState options: FFButtonOptions( width: 270.0, height: 50.0, - padding: const EdgeInsetsDirectional.fromSTEB( - 0.0, 0.0, 0.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB( - 0.0, 0.0, 0.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), + iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), color: FlutterFlowTheme.of(context).primary, - textStyle: - FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: 'Plus Jakarta Sans', - color: Colors.white, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap() - .containsKey('Plus Jakarta Sans'), - ), + textStyle: FlutterFlowTheme.of(context).titleSmall.override( + fontFamily: 'Plus Jakarta Sans', + color: Colors.white, + fontSize: limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: FontWeight.w500, + useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + ), elevation: 3.0, borderSide: const BorderSide( color: Colors.transparent, width: 1.0, ), - disabledColor: - FlutterFlowTheme.of(context).customColor5, + disabledColor: FlutterFlowTheme.of(context).customColor5, disabledTextColor: Colors.white, ), showLoadingIndicator: true, diff --git a/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart b/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart index 2a788357..85999821 100644 --- a/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart +++ b/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart @@ -28,12 +28,10 @@ class SignInTemplateComponentWidget extends StatefulWidget { final Future Function()? toggleSignUpPage; @override - State createState() => - _SignInTemplateComponentWidgetState(); + State createState() => _SignInTemplateComponentWidgetState(); } -class _SignInTemplateComponentWidgetState - extends State with TickerProviderStateMixin { +class _SignInTemplateComponentWidgetState extends State with TickerProviderStateMixin { late SignInTemplateComponentModel _model; final animationsMap = {}; @@ -101,17 +99,14 @@ class _SignInTemplateComponentWidgetState } bool _isFormInvalid() { - if (_model.emailAddressTextController.text == '' || - _model.passwordTextController.text == '') return true; - if (!ValidatorUtil.isValidEmail(_model.emailAddressTextController.text)) - return true; + if (_model.emailAddressTextController.text == '' || _model.passwordTextController.text == '') return true; + if (!ValidatorUtil.isValidEmail(_model.emailAddressTextController.text)) return true; return false; } @override Widget build(BuildContext context) { - double limitedHeaderFontSize = - LimitedFontSizeUtil.getHeaderFontSize(context); + double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context); double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); return Row( @@ -138,16 +133,13 @@ class _SignInTemplateComponentWidgetState enText: 'LET\'S GO! SIGN IN WITH YOUR ACCOUNT', ), textAlign: TextAlign.start, - style: FlutterFlowTheme.of(context) - .displaySmall - .override( + style: FlutterFlowTheme.of(context).displaySmall.override( fontFamily: 'Plus Jakarta Sans', color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedHeaderFontSize, letterSpacing: 0.0, fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap() - .containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), ), ), ), @@ -159,8 +151,7 @@ class _SignInTemplateComponentWidgetState decoration: const BoxDecoration(), child: ClipRRect( borderRadius: BorderRadius.circular(8.0), - child: const AtomImageSvgTheme( - filename: 'login', width: 600, height: 155), + child: const AtomImageSvgTheme(filename: 'login', width: 600, height: 155), ), ), Column( @@ -169,16 +160,14 @@ class _SignInTemplateComponentWidgetState Align( alignment: const AlignmentDirectional(0.0, 0.0), child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB( - 34.0, 0.0, 34.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB(34.0, 0.0, 34.0, 0.0), child: Container( width: double.infinity, constraints: const BoxConstraints( maxWidth: 570.0, ), decoration: BoxDecoration( - color: FlutterFlowTheme.of(context) - .primaryBackground, + color: FlutterFlowTheme.of(context).primaryBackground, borderRadius: BorderRadius.circular(12.0), shape: BoxShape.rectangle, ), @@ -192,318 +181,170 @@ class _SignInTemplateComponentWidgetState children: [ Form( key: _model.formKey, - autovalidateMode: - AutovalidateMode.onUserInteraction, + autovalidateMode: AutovalidateMode.onUserInteraction, child: Column( mainAxisSize: MainAxisSize.max, children: [ Padding( - padding: const EdgeInsetsDirectional - .fromSTEB(0.0, 0.0, 0.0, 16.0), + padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), child: SizedBox( width: double.infinity, child: TextFormField( - key: const ValueKey( - 'emailTextFormField'), - controller: _model - .emailAddressTextController, - focusNode: _model - .emailAddressFocusNode, - cursorColor: - FlutterFlowTheme.of(context) - .primary, - onChanged: (_) => - EasyDebounce.debounce( + key: const ValueKey('emailTextFormField'), + controller: _model.emailAddressTextController, + focusNode: _model.emailAddressFocusNode, + cursorColor: FlutterFlowTheme.of(context).primary, + onChanged: (_) => EasyDebounce.debounce( '_model.emailAddressTextController', - const Duration( - milliseconds: 500), + const Duration(milliseconds: 500), () => setState(() {}), ), autofocus: true, - autofillHints: const [ - AutofillHints.email - ], - textCapitalization: - TextCapitalization.none, - textInputAction: - TextInputAction.next, + autofillHints: const [AutofillHints.email], + textCapitalization: TextCapitalization.none, + textInputAction: TextInputAction.next, obscureText: false, decoration: InputDecoration( isDense: true, - labelText: FFLocalizations.of( - context) - .getText( + labelText: FFLocalizations.of(context).getText( '1ltg0ylb' /* Email */, ), - labelStyle: FlutterFlowTheme - .of(context) - .labelLarge - .override( - fontFamily: - 'Plus Jakarta Sans', - color: - FlutterFlowTheme.of( - context) - .primaryText, - fontSize: - limitedInputFontSize, + labelStyle: FlutterFlowTheme.of(context).labelLarge.override( + fontFamily: 'Plus Jakarta Sans', + color: FlutterFlowTheme.of(context).primaryText, + fontSize: limitedInputFontSize, letterSpacing: 0.0, - fontWeight: - FontWeight.w500, - useGoogleFonts: GoogleFonts - .asMap() - .containsKey( - 'Plus Jakarta Sans'), + fontWeight: FontWeight.w500, + useGoogleFonts: + GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), ), - enabledBorder: - OutlineInputBorder( + enabledBorder: OutlineInputBorder( borderSide: BorderSide( - color: - FlutterFlowTheme.of( - context) - .customColor1, + color: FlutterFlowTheme.of(context).customColor1, width: 0.25, ), - borderRadius: - BorderRadius.circular( - 12.0), + borderRadius: BorderRadius.circular(12.0), ), - focusedBorder: - OutlineInputBorder( + focusedBorder: OutlineInputBorder( borderSide: BorderSide( - color: - FlutterFlowTheme.of( - context) - .success, + color: FlutterFlowTheme.of(context).success, width: 0.25, ), - borderRadius: - BorderRadius.circular( - 12.0), + borderRadius: BorderRadius.circular(12.0), ), - errorBorder: - OutlineInputBorder( + errorBorder: OutlineInputBorder( borderSide: BorderSide( - color: - FlutterFlowTheme.of( - context) - .error, + color: FlutterFlowTheme.of(context).error, width: 0.25, ), - borderRadius: - BorderRadius.circular( - 12.0), + borderRadius: BorderRadius.circular(12.0), ), errorStyle: TextStyle( - color: FlutterFlowTheme.of( - context) - .error, - fontSize: - limitedInputFontSize, + color: FlutterFlowTheme.of(context).error, + fontSize: limitedInputFontSize, fontWeight: FontWeight.w500, ), - focusedErrorBorder: - OutlineInputBorder( + focusedErrorBorder: OutlineInputBorder( borderSide: BorderSide( - color: - FlutterFlowTheme.of( - context) - .error, + color: FlutterFlowTheme.of(context).error, width: 0.25, ), - borderRadius: - BorderRadius.circular( - 12.0), + borderRadius: BorderRadius.circular(12.0), ), suffixIcon: Icon( Icons.email, - color: FlutterFlowTheme.of( - context) - .accent1, + color: FlutterFlowTheme.of(context).accent1, size: 22.0, ), ), - style: - FlutterFlowTheme.of(context) - .bodyLarge - .override( - fontFamily: - 'Plus Jakarta Sans', - color: FlutterFlowTheme - .of(context) - .primaryText, - fontSize: - limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: - FontWeight.w500, - useGoogleFonts: - GoogleFonts - .asMap() - .containsKey( - 'Plus Jakarta Sans'), - ), - keyboardType: - TextInputType.emailAddress, - validator: _model - .emailAddressTextControllerValidator - .asValidator(context), + style: FlutterFlowTheme.of(context).bodyLarge.override( + fontFamily: 'Plus Jakarta Sans', + color: FlutterFlowTheme.of(context).primaryText, + fontSize: limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: FontWeight.w500, + useGoogleFonts: + GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + ), + keyboardType: TextInputType.emailAddress, + validator: + _model.emailAddressTextControllerValidator.asValidator(context), ), ), ), Padding( - padding: const EdgeInsetsDirectional - .fromSTEB(0.0, 0.0, 0.0, 16.0), + padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), child: SizedBox( width: double.infinity, child: TextFormField( - key: const ValueKey( - 'passwordTextFormField'), - controller: _model - .passwordTextController, - cursorColor: - FlutterFlowTheme.of(context) - .primary, - focusNode: - _model.passwordFocusNode, - onChanged: (_) => - EasyDebounce.debounce( - '_model.passwordTextController', - const Duration( - milliseconds: 500), - () => setState(() {})), + key: const ValueKey('passwordTextFormField'), + controller: _model.passwordTextController, + cursorColor: FlutterFlowTheme.of(context).primary, + focusNode: _model.passwordFocusNode, + onChanged: (_) => EasyDebounce.debounce('_model.passwordTextController', + const Duration(milliseconds: 500), () => setState(() {})), autofocus: true, - autofillHints: const [ - AutofillHints.password - ], - textInputAction: - TextInputAction.send, - obscureText: - !_model.passwordVisibility, + autofillHints: const [AutofillHints.password], + textInputAction: TextInputAction.send, + obscureText: !_model.passwordVisibility, decoration: InputDecoration( isDense: true, - labelText: FFLocalizations.of( - context) - .getText( - '2x19ce8k' /* Senha */), - labelStyle: FlutterFlowTheme - .of(context) - .labelLarge - .override( - fontFamily: - 'Plus Jakarta Sans', - color: FlutterFlowTheme - .of(context) - .primaryText, - fontSize: - limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: - FontWeight.w500, - useGoogleFonts: - GoogleFonts - .asMap() - .containsKey( - 'Plus Jakarta Sans')), - enabledBorder: - OutlineInputBorder( + labelText: + FFLocalizations.of(context).getText('2x19ce8k' /* Senha */), + labelStyle: FlutterFlowTheme.of(context).labelLarge.override( + fontFamily: 'Plus Jakarta Sans', + color: FlutterFlowTheme.of(context).primaryText, + fontSize: limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: FontWeight.w500, + useGoogleFonts: + GoogleFonts.asMap().containsKey('Plus Jakarta Sans')), + enabledBorder: OutlineInputBorder( borderSide: BorderSide( - color: - FlutterFlowTheme.of( - context) - .customColor1, - width: 0.25), - borderRadius: - BorderRadius.circular( - 12.0), + color: FlutterFlowTheme.of(context).customColor1, width: 0.25), + borderRadius: BorderRadius.circular(12.0), ), errorStyle: TextStyle( - color: FlutterFlowTheme.of( - context) - .error, - fontSize: - limitedInputFontSize, + color: FlutterFlowTheme.of(context).error, + fontSize: limitedInputFontSize, fontWeight: FontWeight.w500, ), focusedBorder: OutlineInputBorder( borderSide: - const BorderSide( - color: Color( - 0xFF1AAB5F), - width: 0.25), - borderRadius: - BorderRadius.circular( - 12.0)), - errorBorder: - OutlineInputBorder( - borderSide: - const BorderSide( - color: Color( - 0xFFFF5963), - width: 0.25), - borderRadius: - BorderRadius.circular( - 12.0), + const BorderSide(color: Color(0xFF1AAB5F), width: 0.25), + borderRadius: BorderRadius.circular(12.0)), + errorBorder: OutlineInputBorder( + borderSide: const BorderSide(color: Color(0xFFFF5963), width: 0.25), + borderRadius: BorderRadius.circular(12.0), ), - focusedErrorBorder: - OutlineInputBorder( - borderSide: - const BorderSide( - color: Color( - 0xFFFF5963), - width: 0.25), - borderRadius: - BorderRadius.circular( - 12.0), + focusedErrorBorder: OutlineInputBorder( + borderSide: const BorderSide(color: Color(0xFFFF5963), width: 0.25), + borderRadius: BorderRadius.circular(12.0), ), filled: true, - fillColor: - FlutterFlowTheme.of( - context) - .primaryBackground, + fillColor: FlutterFlowTheme.of(context).primaryBackground, suffixIcon: InkWell( - onTap: () => setState(() => - _model.passwordVisibility = - !_model - .passwordVisibility), - focusNode: FocusNode( - skipTraversal: true), + onTap: () => setState( + () => _model.passwordVisibility = !_model.passwordVisibility), + focusNode: FocusNode(skipTraversal: true), child: Icon( _model.passwordVisibility - ? Icons - .visibility_outlined - : Icons - .visibility_off_outlined, - color: - FlutterFlowTheme.of( - context) - .accent1, + ? Icons.visibility_outlined + : Icons.visibility_off_outlined, + color: FlutterFlowTheme.of(context).accent1, size: 24.0), ), ), - style: - FlutterFlowTheme.of(context) - .bodyLarge - .override( - fontFamily: - 'Plus Jakarta Sans', - color: FlutterFlowTheme - .of(context) - .primaryText, - fontSize: - limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: - FontWeight.w500, - useGoogleFonts: - GoogleFonts - .asMap() - .containsKey( - 'Plus Jakarta Sans'), - ), - validator: _model - .passwordTextControllerValidator - .asValidator(context), + style: FlutterFlowTheme.of(context).bodyLarge.override( + fontFamily: 'Plus Jakarta Sans', + color: FlutterFlowTheme.of(context).primaryText, + fontSize: limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: FontWeight.w500, + useGoogleFonts: + GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + ), + validator: _model.passwordTextControllerValidator.asValidator(context), ), ), ), @@ -512,153 +353,77 @@ class _SignInTemplateComponentWidgetState ), Builder( builder: (context) { - if (MediaQuery.sizeOf(context).width < - kBreakpointSmall - ? true - : false) { + if (MediaQuery.sizeOf(context).width < kBreakpointSmall ? true : false) { return Column( mainAxisSize: MainAxisSize.max, children: [ Padding( - padding: - const EdgeInsetsDirectional - .fromSTEB( - 0.0, 0.0, 0.0, 16.0), + padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), child: FFButtonWidget( - key: const ValueKey( - 'SubmitButtonWidget'), + key: const ValueKey('SubmitButtonWidget'), onPressed: _isFormInvalid() ? null : () async { - await AuthenticationService - .signIn( + await AuthenticationService.signIn( context, _model, - emailAdress: _model - .emailAddressTextController - .text, - password: _model - .passwordTextController - .text, + emailAdress: _model.emailAddressTextController.text, + password: _model.passwordTextController.text, ); setState(() {}); }, - text: FFLocalizations.of( - context) - .getText( - 'k44tm7wo' /* Entrar */), + text: FFLocalizations.of(context).getText('k44tm7wo' /* Entrar */), options: FFButtonOptions( width: double.infinity, height: 44.0, - padding: - const EdgeInsetsDirectional - .fromSTEB( - 0.0, 0.0, 0.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), iconPadding: - const EdgeInsetsDirectional - .fromSTEB( - 0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of( - context) - .primary, - textStyle: FlutterFlowTheme - .of(context) - .titleSmall - .override( - fontFamily: - 'Plus Jakarta Sans', - color: FlutterFlowTheme - .of(context) - .info, - fontSize: - limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: - FontWeight.w500, - useGoogleFonts: - GoogleFonts - .asMap() - .containsKey( - 'Plus Jakarta Sans')), + const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), + color: FlutterFlowTheme.of(context).primary, + textStyle: FlutterFlowTheme.of(context).titleSmall.override( + fontFamily: 'Plus Jakarta Sans', + color: FlutterFlowTheme.of(context).info, + fontSize: limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: FontWeight.w500, + useGoogleFonts: + GoogleFonts.asMap().containsKey('Plus Jakarta Sans')), elevation: 3.0, - borderSide: - const BorderSide( - color: Colors - .transparent, - width: 1.0), - borderRadius: - BorderRadius.circular( - 12.0), - disabledColor: - FlutterFlowTheme.of( - context) - .customColor5, - disabledTextColor: - Colors.white, + borderSide: const BorderSide(color: Colors.transparent, width: 1.0), + borderRadius: BorderRadius.circular(12.0), + disabledColor: FlutterFlowTheme.of(context).customColor5, + disabledTextColor: Colors.white, ), showLoadingIndicator: false, ), ), Padding( - padding: - const EdgeInsetsDirectional - .fromSTEB( - 0.0, 0.0, 0.0, 16.0), + padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), child: FFButtonWidget( - key: const ValueKey( - 'toggleSignUpPage'), - onPressed: () async => - await widget - .toggleSignUpPage - ?.call(), - text: FFLocalizations.of( - context) - .getText( + key: const ValueKey('toggleSignUpPage'), + onPressed: () async => await widget.toggleSignUpPage?.call(), + text: FFLocalizations.of(context).getText( '14u7ipws' /* Cadastrar */, ), options: FFButtonOptions( width: double.infinity, height: 44.0, - padding: - const EdgeInsetsDirectional - .fromSTEB( - 0.0, 0.0, 0.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), iconPadding: - const EdgeInsetsDirectional - .fromSTEB( - 0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of( - context) - .customColor1, - textStyle: FlutterFlowTheme - .of(context) - .titleSmall - .override( - fontFamily: - 'Plus Jakarta Sans', - color: FlutterFlowTheme - .of(context) - .secondaryText, - fontSize: - limitedInputFontSize, + const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), + color: FlutterFlowTheme.of(context).customColor1, + textStyle: FlutterFlowTheme.of(context).titleSmall.override( + fontFamily: 'Plus Jakarta Sans', + color: FlutterFlowTheme.of(context).secondaryText, + fontSize: limitedInputFontSize, letterSpacing: 0.0, - fontWeight: - FontWeight.w500, + fontWeight: FontWeight.w500, useGoogleFonts: - GoogleFonts - .asMap() - .containsKey( - 'Plus Jakarta Sans'), + GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), ), elevation: 3.0, - borderSide: - const BorderSide( - color: Colors - .transparent, - width: 1.0), - borderRadius: - BorderRadius.circular( - 12.0), + borderSide: const BorderSide(color: Colors.transparent, width: 1.0), + borderRadius: BorderRadius.circular(12.0), ), showLoadingIndicator: false, ), @@ -668,279 +433,158 @@ class _SignInTemplateComponentWidgetState } else { return Row( mainAxisSize: MainAxisSize.max, - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Expanded( child: Padding( - padding: - const EdgeInsetsDirectional - .fromSTEB(0.0, 0.0, - 0.0, 16.0), + padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), child: FFButtonWidget( - key: const ValueKey< - String>( - 'SubmitButtonWidget'), - onPressed: - _isFormInvalid() - ? null - : () async { - try { - await AuthenticationService - .signIn( - context, - _model, - emailAdress: _model - .emailAddressTextController - .text, - password: _model - .passwordTextController - .text, - ); - setState( - () {}); - } catch (e, s) { - await DialogUtil - .errorDefault( - context); - LogUtil.requestAPIFailed( - 'login.php', - _model - .emailAddressTextController - .text, - "Login", - e, - s); - } - }, - text: FFLocalizations.of( - context) - .getText('1x926nsn'), + key: const ValueKey('SubmitButtonWidget'), + onPressed: _isFormInvalid() + ? null + : () async { + try { + await AuthenticationService.signIn( + context, + _model, + emailAdress: _model.emailAddressTextController.text, + password: _model.passwordTextController.text, + ); + setState(() {}); + } catch (e, s) { + await DialogUtil.errorDefault(context); + LogUtil.requestAPIFailed( + 'login.php', + _model.emailAddressTextController.text, + "Login", + e, + s); + } + }, + text: FFLocalizations.of(context).getText('1x926nsn'), options: FFButtonOptions( width: double.infinity, height: 44.0, padding: - const EdgeInsetsDirectional - .fromSTEB(0.0, - 0.0, 0.0, 0.0), + const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), iconPadding: - const EdgeInsetsDirectional - .fromSTEB(0.0, - 0.0, 0.0, 0.0), - color: - FlutterFlowTheme.of( - context) - .accent1, - textStyle: - FlutterFlowTheme.of( - context) - .titleSmall - .override( - fontFamily: - 'Plus Jakarta Sans', - color: FlutterFlowTheme.of( - context) - .info, - fontSize: - limitedInputFontSize, - letterSpacing: - 0.0, - fontWeight: - FontWeight - .w500, - useGoogleFonts: GoogleFonts - .asMap() - .containsKey( - 'Plus Jakarta Sans'), - ), + const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), + color: FlutterFlowTheme.of(context).accent1, + textStyle: FlutterFlowTheme.of(context).titleSmall.override( + fontFamily: 'Plus Jakarta Sans', + color: FlutterFlowTheme.of(context).info, + fontSize: limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: FontWeight.w500, + useGoogleFonts: + GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + ), elevation: 3.0, - borderSide: - const BorderSide( - color: Colors - .transparent, + borderSide: const BorderSide( + color: Colors.transparent, width: 1.0, ), - borderRadius: - BorderRadius - .circular(12.0), - disabledColor: - const Color( - 0xE81AAB5F), + borderRadius: BorderRadius.circular(12.0), + disabledColor: const Color(0xE81AAB5F), ), - showLoadingIndicator: - true, + showLoadingIndicator: true, ), ), ), Expanded( child: Padding( - padding: - const EdgeInsetsDirectional - .fromSTEB(0.0, 0.0, - 0.0, 16.0), + padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), child: FFButtonWidget( - key: const ValueKey< - String>( - 'toggleSignUpPage'), - onPressed: () async => - await widget - .toggleSignUpPage - ?.call(), - text: FFLocalizations.of( - context) - .getText( - 'jwvd4ai1' /* Cadastrar */), + key: const ValueKey('toggleSignUpPage'), + onPressed: () async => await widget.toggleSignUpPage?.call(), + text: FFLocalizations.of(context) + .getText('jwvd4ai1' /* Cadastrar */), options: FFButtonOptions( width: double.infinity, height: 44.0, padding: - const EdgeInsetsDirectional - .fromSTEB(0.0, - 0.0, 0.0, 0.0), + const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), iconPadding: - const EdgeInsetsDirectional - .fromSTEB(0.0, - 0.0, 0.0, 0.0), - color: - FlutterFlowTheme.of( - context) - .customColor1, - textStyle: - FlutterFlowTheme.of( - context) - .titleSmall - .override( - fontFamily: - 'Plus Jakarta Sans', - color: FlutterFlowTheme.of( - context) - .secondaryText, - fontSize: - 16.0, - letterSpacing: - 0.0, - fontWeight: - FontWeight - .w500, - useGoogleFonts: GoogleFonts - .asMap() - .containsKey( - 'Plus Jakarta Sans'), - ), + const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), + color: FlutterFlowTheme.of(context).customColor1, + textStyle: FlutterFlowTheme.of(context).titleSmall.override( + fontFamily: 'Plus Jakarta Sans', + color: FlutterFlowTheme.of(context).secondaryText, + fontSize: 16.0, + letterSpacing: 0.0, + fontWeight: FontWeight.w500, + useGoogleFonts: + GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + ), elevation: 3.0, - borderSide: - const BorderSide( - color: Colors - .transparent, + borderSide: const BorderSide( + color: Colors.transparent, width: 1.0, ), - borderRadius: - BorderRadius - .circular(12.0), + borderRadius: BorderRadius.circular(12.0), ), - showLoadingIndicator: - false, + showLoadingIndicator: false, ), ), ), - ].divide( - const SizedBox(width: 7.0))); + ].divide(const SizedBox(width: 7.0))); } }, ), Padding( - padding: - const EdgeInsetsDirectional.fromSTEB( - 0.0, 12.0, 0.0, 12.0), + padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0), child: InkWell( - key: const ValueKey( - 'ForgotPassword'), + key: const ValueKey('ForgotPassword'), splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { await showModalBottomSheet( - isScrollControlled: true, - backgroundColor: - Colors.transparent, - context: context, - builder: (context) { - return Padding( - padding: MediaQuery - .viewInsetsOf( - context), - child: - const ForgotPasswordTemplateComponentWidget(), - ); - }) - .then((value) => - safeSetState(() {})); + isScrollControlled: true, + backgroundColor: Colors.transparent, + context: context, + builder: (context) { + return Padding( + padding: MediaQuery.viewInsetsOf(context), + child: const ForgotPasswordTemplateComponentWidget(), + ); + }).then((value) => safeSetState(() {})); }, child: RichText( - textScaler: - MediaQuery.of(context).textScaler, + textScaler: MediaQuery.of(context).textScaler, text: TextSpan( children: [ TextSpan( - text: - FFLocalizations.of(context) - .getText( + text: FFLocalizations.of(context).getText( '05dx91ku' /* Você esqueceu a sua senha? */, ), style: TextStyle( - color: FlutterFlowTheme.of( - context) - .primaryText, - fontSize: - limitedInputFontSize, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: limitedInputFontSize, ), ), TextSpan( - text: FFLocalizations.of( - context) - .getText( - 'p5c6d54y' /* Recupere aqui */), - style: - FlutterFlowTheme.of(context) - .bodyMedium - .override( - fontFamily: - 'Plus Jakarta Sans', - color: FlutterFlowTheme - .of(context) - .primary, - fontSize: - limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: - FontWeight.normal, - useGoogleFonts: - GoogleFonts - .asMap() - .containsKey( - 'Plus Jakarta Sans'), - ), - mouseCursor: - SystemMouseCursors.click, + text: FFLocalizations.of(context) + .getText('p5c6d54y' /* Recupere aqui */), + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: 'Plus Jakarta Sans', + color: FlutterFlowTheme.of(context).primary, + fontSize: limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: FontWeight.normal, + useGoogleFonts: + GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + ), + mouseCursor: SystemMouseCursors.click, ) ], - style: FlutterFlowTheme.of(context) - .bodyMedium - .override( - fontFamily: - FlutterFlowTheme.of( - context) - .bodyMediumFamily, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts - .asMap() - .containsKey( - FlutterFlowTheme.of( - context) - .bodyMediumFamily), - fontSize: - limitedInputFontSize), + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap() + .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + fontSize: limitedInputFontSize), ), ), ), @@ -950,8 +594,7 @@ class _SignInTemplateComponentWidgetState ), ), ), - ).animateOnPageLoad( - animationsMap['containerOnPageLoadAnimation']!), + ).animateOnPageLoad(animationsMap['containerOnPageLoadAnimation']!), ), ), ], diff --git a/lib/features/notification/deep_link_service.dart b/lib/features/notification/deep_link_service.dart index f7aa1ac0..cf7e13f2 100644 --- a/lib/features/notification/deep_link_service.dart +++ b/lib/features/notification/deep_link_service.dart @@ -59,11 +59,14 @@ class DeepLinkService { context: navigatorKey.currentContext!, builder: (context) => Padding( padding: MediaQuery.viewInsetsOf(context), - child: ForgotPasswordScreen(email: email, token: token), + child: ForgotPasswordScreen( + key: ValueKey('ForgotPasswordScreen'), + email: email, + token: token, + ), ), isScrollControlled: true, - backgroundColor: FlutterFlowTheme.of(navigatorKey.currentContext!) - .primaryBackground, + backgroundColor: FlutterFlowTheme.of(navigatorKey.currentContext!).primaryBackground, showDragHandle: true, useSafeArea: true, enableDrag: true, diff --git a/lib/features/notification/notification_service.dart b/lib/features/notification/notification_service.dart index 8e1662d6..8c7b423c 100644 --- a/lib/features/notification/notification_service.dart +++ b/lib/features/notification/notification_service.dart @@ -260,7 +260,7 @@ Future onMessageReceived( } class NotificationService { - static Future initialize() async { + static Future initialize([bool forceRequest = true]) async { await AwesomeNotifications().initialize( 'resource://drawable/notification_icon', [ @@ -296,7 +296,8 @@ class NotificationService { if (isAllowed == false) { await StorageHelper() .set(LocalsStorageKey.requestOSNotification.key, true); - await AwesomeNotifications().requestPermissionToSendNotifications(); + if (forceRequest == true) + await AwesomeNotifications().requestPermissionToSendNotifications(); } } return; diff --git a/lib/flutter_flow/nav/nav.dart b/lib/flutter_flow/nav/nav.dart index 22782a4d..b7efd477 100644 --- a/lib/flutter_flow/nav/nav.dart +++ b/lib/flutter_flow/nav/nav.dart @@ -86,20 +86,11 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { builder: (context, _) { return FutureBuilder( future: () async { - final bool isLogged = - await StorageHelper().get(SecureStorageKey.isLogged.value) == - 'true'; - final bool haveLocal = - await StorageHelper().get(SecureStorageKey.haveLocal.value) == - 'true'; + final bool isLogged = await StorageHelper().get(SecureStorageKey.isLogged.value) == 'true'; + final bool haveLocal = await StorageHelper().get(SecureStorageKey.haveLocal.value) == 'true'; final bool haveUserUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key)) - ?.isNotEmpty ?? - false; - final bool haveDevUUID = - (await StorageHelper().get(ProfileStorageKey.devUUID.key)) - ?.isNotEmpty ?? - false; + (await StorageHelper().get(ProfileStorageKey.userUUID.key))?.isNotEmpty ?? false; + final bool haveDevUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key))?.isNotEmpty ?? false; if (isLogged && haveDevUUID && haveUserUUID) { return haveLocal @@ -109,20 +100,17 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { create: (context) => MenuBloc( style: MenuView.list_grid, item: EnumMenuItem.button, - entries: MenuEntry.getEntriesByType( - MenuEntryType.Home), + entries: MenuEntry.getEntriesByType(MenuEntryType.Home), )..add(MenuEvent()), ), BlocProvider( create: (context) => HomeBloc()..add(HomeEvent()), ), BlocProvider( - create: (context) => - LocalProfileBloc()..add(LocalProfileEvent()), + create: (context) => LocalProfileBloc()..add(LocalProfileEvent()), ), ], - child: HomePageWidget( - key: UniqueKey(), LocalsRepositoryImpl().update), + child: HomePageWidget(key: UniqueKey(), LocalsRepositoryImpl().update), ) : const ReceptionPageWidget(); } else { @@ -146,13 +134,11 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { name: 'forgotPassword', path: '/forgotPassword', builder: (context, params) { - late final String email = - params.getParam('email', ParamType.String); - late final String token = - params.getParam('token', ParamType.String); + late final String email = params.getParam('email', ParamType.String); + late final String token = params.getParam('token', ParamType.String); return ForgotPasswordScreen( - key: UniqueKey(), + key: ValueKey('ForgotPasswordScreen'), email: email, token: token, ); @@ -166,8 +152,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { name: 'homePage', path: '/homePage', builder: (context, params) { - final Future Function(BuildContext context)? update = - params.getParam('update', ParamType.Function); + final Future Function(BuildContext context)? update = params.getParam('update', ParamType.Function); return MultiBlocProvider( providers: [ BlocProvider( @@ -181,8 +166,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { create: (context) => HomeBloc()..add(HomeEvent()), ), BlocProvider( - create: (context) => - LocalProfileBloc()..add(LocalProfileEvent()), + create: (context) => LocalProfileBloc()..add(LocalProfileEvent()), ), ], child: HomePageWidget(key: UniqueKey(), update), @@ -191,16 +175,12 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { FFRoute( name: 'petsOnThePropertyPage', path: '/petsOnThePropertyPage', - builder: (context, params) => - Scaffold(body: const PetsHistoryScreen(isApp: true))), + builder: (context, params) => Scaffold(body: const PetsHistoryScreen(isApp: true))), FFRoute( name: 'vehiclesOnThePropertyPage', path: '/vehiclesOnThePropertyPage', builder: (context, params) => const VehicleOnTheProperty()), - FFRoute( - name: 'receptionPage', - path: '/receptionPage', - builder: (context, params) => const ReceptionPageWidget()), + FFRoute(name: 'receptionPage', path: '/receptionPage', builder: (context, params) => const ReceptionPageWidget()), FFRoute( name: 'messageHistoryPage', path: '/messageHistoryPage', @@ -212,28 +192,19 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { FFRoute( name: 'scheduleCompleteVisitPage', path: '/scheduleCompleteVisitPage', - builder: (context, params) => - const ScheduleCompleteVisitPageWidget()), + builder: (context, params) => const ScheduleCompleteVisitPageWidget()), FFRoute( - name: 'deliverySchedule', - path: '/deliverySchedule', - builder: (context, params) => const DeliverySchedule()), + name: 'deliverySchedule', path: '/deliverySchedule', builder: (context, params) => const DeliverySchedule()), FFRoute( name: 'provisionalSchedule', path: '/provisionalSchedule', builder: (context, params) => const ProvisionalSchedule()), - FFRoute( - name: 'fastPassPage', - path: '/fastPassPage', - builder: (context, params) => FastPassPageWidget()), + FFRoute(name: 'fastPassPage', path: '/fastPassPage', builder: (context, params) => FastPassPageWidget()), FFRoute( name: 'preferencesSettings', path: '/preferencesSettings', builder: (context, params) => PreferencesPageWidget()), - FFRoute( - name: 'aboutProperty', - path: '/aboutProperty', - builder: (context, params) => AboutPropertyPage()), + FFRoute(name: 'aboutProperty', path: '/aboutProperty', builder: (context, params) => AboutPropertyPage()), FFRoute( name: 'residentsOnThePropertyPage', path: '/residentsOnThePropertyPage', @@ -249,11 +220,8 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { FFRoute( name: 'acessHistoryPage', path: '/acessHistoryPage', - builder: (context, params) => AccessHistoryScreen(opt: const { - 'personType': '.*', - 'accessType': '.*', - 'search': '.*' - })), + builder: (context, params) => + AccessHistoryScreen(opt: const {'personType': '.*', 'accessType': '.*', 'search': '.*'})), FFRoute( name: 'provisionalHistoryPage', path: '/provisionalHistoryPage', @@ -262,34 +230,13 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { name: 'liberationHistory', path: '/liberationHistory', builder: (context, params) => const LiberationHistoryWidget()), - FFRoute( - name: 'signInPage', - path: '/signInPage', - builder: (context, params) => const SignInPageWidget()), - FFRoute( - name: 'signUpPage', - path: '/signUpPage', - builder: (context, params) => const SignUpPageWidget()), - FFRoute( - name: 'welcomePage', - path: '/welcomePage', - builder: (context, params) => const WelcomePage()), - FFRoute( - name: 'qrCodePage', - path: '/qrCodePage', - builder: (context, params) => const QrCodePageWidget()), - FFRoute( - name: 'preferencesPage', - path: '/preferencesPage', - builder: (context, params) => PreferencesPageWidget()), - FFRoute( - name: 'packageOrder', - path: '/packageOrder', - builder: (context, params) => const PackageOrderPage()), - FFRoute( - name: 'reservation', - path: '/reservation', - builder: (context, params) => ReservationPageWidget()), + FFRoute(name: 'signInPage', path: '/signInPage', builder: (context, params) => const SignInPageWidget()), + FFRoute(name: 'signUpPage', path: '/signUpPage', builder: (context, params) => const SignUpPageWidget()), + FFRoute(name: 'welcomePage', path: '/welcomePage', builder: (context, params) => const WelcomePage()), + FFRoute(name: 'qrCodePage', path: '/qrCodePage', builder: (context, params) => const QrCodePageWidget()), + FFRoute(name: 'preferencesPage', path: '/preferencesPage', builder: (context, params) => PreferencesPageWidget()), + FFRoute(name: 'packageOrder', path: '/packageOrder', builder: (context, params) => const PackageOrderPage()), + FFRoute(name: 'reservation', path: '/reservation', builder: (context, params) => ReservationPageWidget()), FFRoute( name: 'petsPage', path: '/petsPage', @@ -305,9 +252,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { extension NavParamExtensions on Map { Map get withoutNulls => Map.fromEntries( - entries - .where((e) => e.value != null) - .map((e) => MapEntry(e.key, e.value!)), + entries.where((e) => e.value != null).map((e) => MapEntry(e.key, e.value!)), ); } @@ -321,8 +266,7 @@ extension NavigationExtensions on BuildContext { } extension _GoRouterStateExtensions on GoRouterState { - Map get extraMap => - extra != null ? extra as Map : {}; + Map get extraMap => extra != null ? extra as Map : {}; Map get allParams => {} ..addAll(pathParameters) ..addAll(uri.queryParameters) @@ -335,9 +279,8 @@ extension _GoRouterStateExtensions on GoRouterState { extension GoRouterLocationExtension on GoRouter { String getCurrentLocation() { final RouteMatch lastMatch = routerDelegate.currentConfiguration.last; - final RouteMatchList matchList = lastMatch is ImperativeRouteMatch - ? lastMatch.matches - : routerDelegate.currentConfiguration; + final RouteMatchList matchList = + lastMatch is ImperativeRouteMatch ? lastMatch.matches : routerDelegate.currentConfiguration; return matchList.uri.toString(); } } @@ -350,17 +293,13 @@ class FFParameters { Map futureParamValues = {}; bool get isEmpty => - state.allParams.isEmpty || - (state.allParams.length == 1 && - state.extraMap.containsKey(kTransitionInfoKey)); - bool isAsyncParam(MapEntry param) => - asyncParams.containsKey(param.key) && param.value is String; + state.allParams.isEmpty || (state.allParams.length == 1 && state.extraMap.containsKey(kTransitionInfoKey)); + bool isAsyncParam(MapEntry param) => asyncParams.containsKey(param.key) && param.value is String; bool get hasFutures => state.allParams.entries.any(isAsyncParam); Future completeFutures() => Future.wait( state.allParams.entries.where(isAsyncParam).map( (param) async { - final doc = await asyncParams[param.key]!(param.value) - .onError((_, __) => null); + final doc = await asyncParams[param.key]!(param.value).onError((_, __) => null); if (doc != null) { futureParamValues[param.key] = doc; return true; @@ -370,15 +309,12 @@ class FFParameters { ), ).onError((_, __) => [false]).then((v) => v.every((e) => e)); - dynamic getParam(String paramName, ParamType type, - {bool isList = false, StructBuilder? structBuilder}) { - if (futureParamValues.containsKey(paramName)) - return futureParamValues[paramName]; + dynamic getParam(String paramName, ParamType type, {bool isList = false, StructBuilder? structBuilder}) { + if (futureParamValues.containsKey(paramName)) return futureParamValues[paramName]; if (!state.allParams.containsKey(paramName)) return null; final param = state.allParams[paramName]; if (param is! String) return param; - return deserializeParam(param, type, isList, - structBuilder: structBuilder); + return deserializeParam(param, type, isList, structBuilder: structBuilder); } } @@ -418,16 +354,13 @@ class FFRoute { key: state.pageKey, child: child, transitionDuration: transitionInfo.duration, - transitionsBuilder: - (context, animation, secondaryAnimation, child) => - PageTransition( + transitionsBuilder: (context, animation, secondaryAnimation, child) => PageTransition( type: transitionInfo.transitionType, duration: transitionInfo.duration, reverseDuration: transitionInfo.duration, alignment: transitionInfo.alignment, child: child, - ).buildTransitions( - context, animation, secondaryAnimation, child), + ).buildTransitions(context, animation, secondaryAnimation, child), ) : MaterialPage(key: state.pageKey, child: child); }, @@ -448,8 +381,7 @@ class TransitionInfo { final Duration duration; final Alignment? alignment; - static TransitionInfo appDefault() => - const TransitionInfo(hasTransition: false); + static TransitionInfo appDefault() => const TransitionInfo(hasTransition: false); } class RootPageContext { @@ -461,9 +393,7 @@ class RootPageContext { final rootPageContext = context.read(); final isRootPage = rootPageContext?.isRootPage ?? false; final location = GoRouterState.of(context).uri.toString(); - return isRootPage && - location != '/' && - location != rootPageContext?.errorRoute; + return isRootPage && location != '/' && location != rootPageContext?.errorRoute; } static Widget wrap(Widget child, {String? errorRoute}) => diff --git a/lib/pages/forgot_password_page/forgot_password_screen.dart b/lib/pages/forgot_password_page/forgot_password_screen.dart index bf737647..da97657c 100644 --- a/lib/pages/forgot_password_page/forgot_password_screen.dart +++ b/lib/pages/forgot_password_page/forgot_password_screen.dart @@ -15,8 +15,7 @@ import '../../flutter_flow/internationalization.dart'; import 'forgot_password_model.dart'; class ForgotPasswordScreen extends StatefulWidget { - const ForgotPasswordScreen( - {super.key, required this.email, required this.token}); + const ForgotPasswordScreen({super.key, required this.email, required this.token}); final String email; final String token; @@ -24,8 +23,7 @@ class ForgotPasswordScreen extends StatefulWidget { State createState() => _ForgotPasswordScreenState(); } -class _ForgotPasswordScreenState extends State - with TickerProviderStateMixin { +class _ForgotPasswordScreenState extends State with TickerProviderStateMixin { late ForgotPasswordScreenModel _model; final animationsMap = {}; @@ -116,6 +114,7 @@ class _ForgotPasswordScreenState extends State }, ), title: Text( + key: ValueKey('ForgotPasswordText'), FFLocalizations.of(context).getVariableText( ptText: 'Recuperar Senha', enText: 'Recover Password', @@ -149,8 +148,7 @@ class _ForgotPasswordScreenState extends State width: MediaQuery.of(context).size.width, child: SingleChildScrollView( child: Padding( - padding: const EdgeInsets.only( - left: 15.0, right: 15.0, top: 10.0, bottom: 0.0), + padding: const EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0, bottom: 0.0), child: Container( width: double.infinity, constraints: const BoxConstraints(maxWidth: 570.0), @@ -159,8 +157,7 @@ class _ForgotPasswordScreenState extends State borderRadius: BorderRadius.circular(12.0), ), child: Padding( - padding: const EdgeInsets.only( - left: 20.0, right: 20.0, top: 10.0, bottom: 0.0), + padding: const EdgeInsets.only(left: 20.0, right: 20.0, top: 10.0, bottom: 0.0), child: Column( mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.center, @@ -174,25 +171,21 @@ class _ForgotPasswordScreenState extends State fontSize: 24.0, fontWeight: FontWeight.bold, letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey('Nunito'), + useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), ), )), Align( alignment: const AlignmentDirectional(-1.0, 0.0), child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB( - 20.0, 24.0, 0.0, 30.0), + padding: const EdgeInsetsDirectional.fromSTEB(20.0, 24.0, 0.0, 30.0), child: Text( message, textAlign: TextAlign.start, style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: - FlutterFlowTheme.of(context).bodyMediumFamily, + fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey( - FlutterFlowTheme.of(context) - .bodyMediumFamily), + useGoogleFonts: + GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), ), ), ), @@ -208,42 +201,32 @@ class _ForgotPasswordScreenState extends State controller: _model.passwordRegisterFormTextController, focusNode: _model.passwordRegisterFormFocusNode, visibility: _model.passwordRegisterFormVisibility, - onVisibilityToggle: () => setState(() => - _model.passwordRegisterFormVisibility = - !_model.passwordRegisterFormVisibility), - label: FFLocalizations.of(context).getVariableText( - ptText: 'Nova Senha', enText: 'New Password'), - hint: FFLocalizations.of(context).getVariableText( - ptText: 'Insira sua senha', - enText: 'Enter your password'), - asValidator: _model - .passwordRegisterFormTextControllerValidator - .asValidator(context), + onVisibilityToggle: () => setState( + () => _model.passwordRegisterFormVisibility = !_model.passwordRegisterFormVisibility), + label: + FFLocalizations.of(context).getVariableText(ptText: 'Nova Senha', enText: 'New Password'), + hint: FFLocalizations.of(context) + .getVariableText(ptText: 'Insira sua senha', enText: 'Enter your password'), + asValidator: _model.passwordRegisterFormTextControllerValidator.asValidator(context), ), _buildPasswordField( context, controller: _model.passwordConfirmFormTextController, focusNode: _model.passwordConfirmFormFocusNode, visibility: _model.passwordConfirmFormVisibility, - onVisibilityToggle: () => setState(() => - _model.passwordConfirmFormVisibility = - !_model.passwordConfirmFormVisibility), - label: FFLocalizations.of(context).getVariableText( - ptText: 'Confirme a Senha', - enText: 'Confirm Password'), - hint: FFLocalizations.of(context).getVariableText( - ptText: 'Confirme sua senha', - enText: 'Confirm your password'), - asValidator: _model - .passwordConfirmFormTextControllerValidator - .asValidator(context), + onVisibilityToggle: () => setState( + () => _model.passwordConfirmFormVisibility = !_model.passwordConfirmFormVisibility), + label: FFLocalizations.of(context) + .getVariableText(ptText: 'Confirme a Senha', enText: 'Confirm Password'), + hint: FFLocalizations.of(context) + .getVariableText(ptText: 'Confirme sua senha', enText: 'Confirm your password'), + asValidator: _model.passwordConfirmFormTextControllerValidator.asValidator(context), ), ], ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB( - 0.0, 0.0, 0.0, 16.0), + padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), child: FFButtonWidget( key: const ValueKey('SubmitButtonWidget'), onPressed: _model.isFormInvalid() @@ -265,22 +248,16 @@ class _ForgotPasswordScreenState extends State width: double.infinity, height: 44.0, color: FlutterFlowTheme.of(context).accent1, - textStyle: FlutterFlowTheme.of(context) - .titleSmall - .override( - fontFamily: 'Plus Jakarta Sans', - color: - FlutterFlowTheme.of(context).secondaryText, - fontSize: 16.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap() - .containsKey('Plus Jakarta Sans')), + textStyle: FlutterFlowTheme.of(context).titleSmall.override( + fontFamily: 'Plus Jakarta Sans', + color: FlutterFlowTheme.of(context).secondaryText, + fontSize: 16.0, + fontWeight: FontWeight.w500, + useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans')), elevation: 3.0, - borderSide: const BorderSide( - color: Colors.transparent, width: 1.0), + borderSide: const BorderSide(color: Colors.transparent, width: 1.0), borderRadius: BorderRadius.circular(12.0), - disabledColor: - FlutterFlowTheme.of(context).customColor5, + disabledColor: FlutterFlowTheme.of(context).customColor5, disabledTextColor: Colors.white, ), showLoadingIndicator: true, @@ -328,28 +305,22 @@ class _ForgotPasswordScreenState extends State color: FlutterFlowTheme.of(context).primaryText, fontSize: 16.0, fontWeight: FontWeight.w500, - useGoogleFonts: - GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), ), enabledBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of(context).customColor1, - width: 0.25), + borderSide: BorderSide(color: FlutterFlowTheme.of(context).customColor1, width: 0.25), borderRadius: BorderRadius.circular(12.0), ), focusedBorder: OutlineInputBorder( - borderSide: - const BorderSide(color: Color(0xFF1AAB5F), width: 0.25), + borderSide: const BorderSide(color: Color(0xFF1AAB5F), width: 0.25), borderRadius: BorderRadius.circular(12.0), ), errorBorder: OutlineInputBorder( - borderSide: - const BorderSide(color: Color(0xFFFF5963), width: 0.25), + borderSide: const BorderSide(color: Color(0xFFFF5963), width: 0.25), borderRadius: BorderRadius.circular(12.0), ), focusedErrorBorder: OutlineInputBorder( - borderSide: - const BorderSide(color: Color(0xFFFF5963), width: 0.25), + borderSide: const BorderSide(color: Color(0xFFFF5963), width: 0.25), borderRadius: BorderRadius.circular(12.0), ), filled: true, @@ -359,9 +330,7 @@ class _ForgotPasswordScreenState extends State onTap: onVisibilityToggle, focusNode: FocusNode(skipTraversal: true), child: Icon( - visibility - ? Icons.visibility_outlined - : Icons.visibility_off_outlined, + visibility ? Icons.visibility_outlined : Icons.visibility_off_outlined, color: FlutterFlowTheme.of(context).accent1, size: 24.0, ), @@ -372,8 +341,7 @@ class _ForgotPasswordScreenState extends State color: FlutterFlowTheme.of(context).primaryText, fontSize: 16.0, fontWeight: FontWeight.w500, - useGoogleFonts: - GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), ), validator: asValidator, ), diff --git a/pubspec.lock b/pubspec.lock index 056ad392..1494098d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -146,50 +146,50 @@ packages: dependency: transitive description: name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" build_config: dependency: transitive description: name: build_config - sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" build_daemon: dependency: transitive description: name: build_daemon - sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" + sha256: "294a2edaf4814a378725bfe6358210196f5ea37af89ecd81bfa32960113d4948" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.0.3" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + sha256: "99d3980049739a985cf9b21f30881f46db3ebc62c5b8d5e60e27440876b1ba1e" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.4.3" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d" + sha256: "74691599a5bc750dc96a6b4bfd48f7d9d66453eab04c7f4063134800d6a5c573" url: "https://pub.dev" source: hosted - version: "2.4.13" + version: "2.4.14" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 + sha256: "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021" url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" built_collection: dependency: transitive description: @@ -824,18 +824,18 @@ packages: dependency: transitive description: name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" go_router: dependency: "direct main" description: name: go_router - sha256: "7c2d40b59890a929824f30d442e810116caf5088482629c894b9e4478c67472d" + sha256: daf3ff5570f55396b2d2c9bf8136d7db3a8acf208ac0cef92a3ae2beb9a81550 url: "https://pub.dev" source: hosted - version: "14.6.3" + version: "14.7.1" google_fonts: dependency: "direct main" description: @@ -896,10 +896,10 @@ packages: dependency: transitive description: name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.2" image: dependency: "direct dev" description: @@ -952,10 +952,10 @@ packages: dependency: transitive description: name: image_picker_macos - sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + sha256: "1b90ebbd9dcf98fb6c1d01427e49a55bd96b5d67b8c67cf955d60a5de74207c1" url: "https://pub.dev" source: hosted - version: "0.2.1+1" + version: "0.2.1+2" image_picker_platform_interface: dependency: "direct main" description: @@ -1061,10 +1061,10 @@ packages: dependency: "direct dev" description: name: lints - sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.1.1" local_auth: dependency: "direct main" description: @@ -1181,10 +1181,10 @@ packages: dependency: "direct dev" description: name: mockito - sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" + sha256: f99d8d072e249f719a5531735d146d8cf04c580d93920b04de75bef6dfb2daf6 url: "https://pub.dev" source: hosted - version: "5.4.4" + version: "5.4.5" nested: dependency: transitive description: @@ -1461,10 +1461,10 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: "81876843eb50dc2e1e5b151792c9a985c5ed2536914115ed04e9c8528f6647b0" + sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.5.0" qr: dependency: transitive description: @@ -1533,10 +1533,10 @@ packages: dependency: "direct main" description: name: shared_preferences - sha256: a752ce92ea7540fc35a0d19722816e04d0e72828a4200e83a98cf1a1eb524c9a + sha256: c59819dacc6669a1165d54d2735a9543f136f9b3cec94ca65cea6ab8dffc422e url: "https://pub.dev" source: hosted - version: "2.3.5" + version: "2.4.0" shared_preferences_android: dependency: "direct main" description: @@ -1589,10 +1589,10 @@ packages: dependency: transitive description: name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.4.2" shelf_packages_handler: dependency: transitive description: @@ -1874,10 +1874,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + sha256: "3ba963161bd0fe395917ba881d320b9c4f6dd3c4a233da62ab18a5025c85f1e9" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.4.0" url_launcher_windows: dependency: transitive description: @@ -1962,10 +1962,10 @@ packages: dependency: transitive description: name: web_socket_channel - sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" + sha256: "0b8e2457400d8a859b7b2030786835a28a8e80836ef64402abef392ff4f1d0e5" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" webdriver: dependency: transitive description: @@ -2055,5 +2055,5 @@ packages: source: hosted version: "3.1.3" sdks: - dart: ">=3.5.0 <4.0.0" - flutter: ">=3.24.0" + dart: ">=3.6.0 <4.0.0" + flutter: ">=3.27.0" diff --git a/scripts/test.ps1 b/scripts/test.ps1 new file mode 100644 index 00000000..bb742505 --- /dev/null +++ b/scripts/test.ps1 @@ -0,0 +1,3 @@ +flutter clean +flutter pub get +patrol test --target integration_test/app_test.dart --verbose \ No newline at end of file diff --git a/scripts/test.sh b/scripts/test.sh new file mode 100644 index 00000000..3ab1e543 --- /dev/null +++ b/scripts/test.sh @@ -0,0 +1,3 @@ +flutter clean +flutter pub get +patrol test --target integration_test/app_test.dart \ No newline at end of file