Merge branch 'fix/fd-1114' into develop

This commit is contained in:
J. A. Messias 2025-01-27 14:29:31 -03:00
commit 114e0151cf
19 changed files with 656 additions and 1037 deletions

View File

@ -1,5 +1,5 @@
org.gradle.jvmargs=-Xmx4608m org.gradle.jvmargs=-Xmx4608m
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
android.enableR8=true # android.enableR8=true
enableProguardInReleaseBuilds = true enableProguardInReleaseBuilds = true

View File

@ -1,6 +1,10 @@
import 'dart:collection'; import 'dart:collection';
import 'dart:math'; 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/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.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/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/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/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/backend/api_requests/index.dart';
import 'package:hub/features/local/index.dart'; import 'package:hub/features/local/index.dart';
import 'package:hub/features/menu/index.dart'; import 'package:hub/features/menu/index.dart';
import 'package:hub/features/module/data/index.dart'; import 'package:hub/features/module/data/index.dart';
import 'package:hub/features/module/domain/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/features/storage/index.dart';
import 'package:hub/flutter_flow/index.dart' as ff; import 'package:hub/flutter_flow/index.dart' as ff;
import 'package:hub/flutter_flow/index.dart';
import 'package:hub/initialization.dart'; import 'package:hub/initialization.dart';
import 'package:hub/main.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:integration_test/integration_test.dart';
import 'package:material_symbols_icons/symbols.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'; import 'fuzzer/fuzzer.dart';
export 'package:flutter_test/flutter_test.dart';
export 'package:patrol/patrol.dart';
part 'auth_test.dart'; part 'auth_test.dart';
part 'common.dart';
part 'home_test.dart'; part 'home_test.dart';
part 'locals_test.dart'; part 'locals_test.dart';
part 'menu_test.dart'; part 'menu_test.dart';
@ -36,29 +50,30 @@ part 'storage_test.dart';
part 'utils_test.dart'; part 'utils_test.dart';
part 'welcome_test.dart'; part 'welcome_test.dart';
late PatrolTester $; late PatrolIntegrationTester $;
void main() { void main() {
//init integration test //init integration test
IntegrationTestWidgetsFlutterBinding.ensureInitialized(); // IntegrationTestWidgetsFlutterBinding.ensureInitialized();
setUp(() async {}); // setUp(() async {});
tearDown(() async {}); // tearDown(() async {});
WelcomeTest.signInToSignUp(); // WelcomeTest.signInToSignUp();
WelcomeTest.signUpToSignIn(); // WelcomeTest.signUpToSignIn();
AuthenticationTest.signIn(); // AuthenticationTest.signIn();
AuthenticationTest.signUp(); // AuthenticationTest.signUp();
AuthenticationTest.signOut(); // AuthenticationTest.signOut();
AuthenticationTest.recovery();
ModularizationTest.switchLicense(); // ModularizationTest.switchLicense();
ModularizationTest.containLicense(); // ModularizationTest.containLicense();
MenuTest.navToEntries(); // MenuTest.navToEntries();
MenuTest.containEntries(); // MenuTest.containEntries();
MenuTest.labels2AppbarConsistency(); // MenuTest.labels2AppbarConsistency();
LocalsTest.setLocal(); // LocalsTest.setLocal();
LocalsTest.unlinkLocal(); // LocalsTest.unlinkLocal();
} }

View File

@ -2,12 +2,11 @@ part of 'app_test.dart';
class AuthenticationTest { class AuthenticationTest {
static Future<void> signIn() async { static Future<void> signIn() async {
patrolWidgetTest( patrol(
'Sign-In with fuzzed emails', 'Sign-In with fuzzed emails',
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester $.tester.printToConsole('Authentication Test - Sign-In with fuzzed emails');
.printToConsole('Authentication Test - Sign-In with fuzzed emails');
final PatrolFinder throwsException = $(Dialog).$(ThrowExceptionWidget); final PatrolFinder throwsException = $(Dialog).$(ThrowExceptionWidget);
final Fuzzer fuzzer = Fuzzer( final Fuzzer fuzzer = Fuzzer(
@ -33,8 +32,7 @@ class AuthenticationTest {
], ],
iterations: 2, iterations: 2,
); );
Map<String, String> concat( Map<String, String> concat(String username, String domain, String password) {
String username, String domain, String password) {
return { return {
'emailTextFormField': '${username}@${domain}.test', 'emailTextFormField': '${username}@${domain}.test',
'passwordTextFormField': password, 'passwordTextFormField': password,
@ -43,7 +41,7 @@ class AuthenticationTest {
final credentials = fuzzer.fuzz(concat); final credentials = fuzzer.fuzz(concat);
await _unlogged(); await _unlogged($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await _navigateToSignIn($); await _navigateToSignIn($);
@ -59,12 +57,11 @@ class AuthenticationTest {
}, },
); );
patrolWidgetTest( patrol(
'Sign-In with email_app@exemplo.com', 'Sign-In with email_app@exemplo.com',
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole( $.tester.printToConsole('Authentication Test - Sign-In with email_app@exemplo.com');
'Authentication Test - Sign-In with email_app@exemplo.com');
final PatrolFinder throwsException = $(Dialog).$(ThrowExceptionWidget); final PatrolFinder throwsException = $(Dialog).$(ThrowExceptionWidget);
final Map<String, String> credentials = { final Map<String, String> credentials = {
@ -72,7 +69,7 @@ class AuthenticationTest {
'passwordTextFormField': '12345678', 'passwordTextFormField': '12345678',
}; };
await _unlogged(); await _unlogged($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await _navigateToSignIn($); await _navigateToSignIn($);
await _auth(credentials, $, throwsException); await _auth(credentials, $, throwsException);
@ -81,12 +78,11 @@ class AuthenticationTest {
} }
static Future<void> signUp() async { static Future<void> signUp() async {
patrolWidgetTest( patrol(
'Sign Up - credenciais já registradas', 'Sign Up - credenciais já registradas',
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole( $.tester.printToConsole('Authentication Test - Sign-Up: credenciais já registradas');
'Authentication Test - Sign-Up: credenciais já registradas');
final PatrolFinder throwsException = $(Dialog).$(ThrowExceptionWidget); final PatrolFinder throwsException = $(Dialog).$(ThrowExceptionWidget);
final Map<String, String> credentials = { final Map<String, String> credentials = {
@ -94,7 +90,7 @@ class AuthenticationTest {
'emailTextFormField': 'email_app@exemplo.com', 'emailTextFormField': 'email_app@exemplo.com',
'passwordTextFormField': '12345678', 'passwordTextFormField': '12345678',
}; };
await _unlogged(); await _unlogged($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await _navigateToSignUp($); await _navigateToSignUp($);
await _auth(credentials, $, throwsException); await _auth(credentials, $, throwsException);
@ -102,12 +98,11 @@ class AuthenticationTest {
}, },
); );
patrolWidgetTest( patrol(
'Sign Up - credenciais novas', 'Sign Up - credenciais novas',
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester $.tester.printToConsole('Authentication Test - Sign-Up: credenciais novas');
.printToConsole('Authentication Test - Sign-Up: credenciais novas');
final PatrolFinder throwsException = $(Dialog).$(ThrowExceptionWidget); final PatrolFinder throwsException = $(Dialog).$(ThrowExceptionWidget);
@ -140,8 +135,7 @@ class AuthenticationTest {
], ],
iterations: 2, iterations: 2,
); );
Map<String, String> concat( Map<String, String> concat(String name, String username, String domain, String password) {
String name, String username, String domain, String password) {
return { return {
'nameTextFormField': name, 'nameTextFormField': name,
'emailTextFormField': '${username}@${domain}.test', 'emailTextFormField': '${username}@${domain}.test',
@ -151,7 +145,7 @@ class AuthenticationTest {
final credentials = fuzzer.fuzz(concat); final credentials = fuzzer.fuzz(concat);
await _unlogged(); await _unlogged($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
@ -170,62 +164,54 @@ class AuthenticationTest {
} }
static Future<void> signOut() async { static Future<void> signOut() async {
patrolWidgetTest( patrol(
'Deslogar da Conta', 'Deslogar da Conta',
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole( $.tester.printToConsole('Authentication Test - Sign-Out: Deslogar da Conta');
'Authentication Test - Sign-Out: Deslogar da Conta');
await _loggedWithMultiLocalsAccount(); await _loggedWithMultiLocalsAccount($);
await $.pumpWidget(const App()); await $.pumpWidget(const App());
await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(MenuStaggeredView));
await $(Icons.menu_rounded) // await $(Icons.menu_rounded).waitUntilVisible().tap();
.waitUntilVisible()
.tap();
await $.waitUntilVisible($(MenuListView)); await $.waitUntilVisible($(MenuListView));
await $(Icons.exit_to_app) await $(Icons.exit_to_app).waitUntilVisible().tap(settlePolicy: SettlePolicy.trySettle);
.waitUntilVisible()
.tap(settlePolicy: SettlePolicy.trySettle);
await Future.delayed(const Duration(milliseconds: 500)); await Future.delayed(const Duration(milliseconds: 500));
}, },
); );
} }
static Future<void> recovery() async { static void recovery() async {
patrolWidgetTest( patrol('Open url in the app', ($) async {
'ForgotPassword', await _loggedWithMultiLocalsAccount($);
(PatrolTester tester) async { await $.pumpWidget(const App());
$ = tester;
$.tester
.printToConsole('Authentication Test - ForgotPassword');
final PatrolFinder throwsException = $(Dialog).$(ThrowExceptionWidget);
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 = { await $.pumpAndSettle();
'emailTextFormField': 'email_app@exemplo.com', Future.delayed(Duration(seconds: 3));
await $.pump(Duration(seconds: 3));
}; await $.pumpAndSettle();
final PatrolFinder forgotPassword = await $(#ForgotPasswordScreen).waitUntilVisible();
await _unlogged(); expect(forgotPassword, findsOneWidget);
await $.pumpWidgetAndSettle(const App()); });
await _navigateToSignIn($);
await _auth(credentials, $, throwsException);
},
);
} }
} }
Future<void> _auth( Future<void> _auth(
Map<String, String> credentials, Map<String, String> credentials,
PatrolTester $, PatrolIntegrationTester $,
PatrolFinder throwsException, PatrolFinder throwsException,
) async { ) async {
await _enterCredentials(credentials, $); await _enterCredentials(credentials, $);
@ -234,7 +220,7 @@ Future<void> _auth(
Future<void> _enterCredentials( Future<void> _enterCredentials(
Map<String, String> credentials, Map<String, String> credentials,
PatrolTester $, PatrolIntegrationTester $,
) async { ) async {
for (var entry in credentials.entries) { for (var entry in credentials.entries) {
await $(ValueKey(entry.key)) // await $(ValueKey(entry.key)) //
@ -244,8 +230,7 @@ Future<void> _enterCredentials(
} }
} }
Future<void> _submit( Future<void> _submit(String key, PatrolIntegrationTester $, PatrolFinder throwsException) async {
String key, PatrolTester $, PatrolFinder throwsException) async {
await $(ValueKey(key)) // await $(ValueKey(key)) //
.waitUntilVisible() .waitUntilVisible()
.tap(); .tap();
@ -263,6 +248,5 @@ Future<void> _submit(
String _generateRandomString(int length) { String _generateRandomString(int length) {
const chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; const chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
final rand = Random(); final rand = Random();
return List.generate(length, (index) => chars[rand.nextInt(chars.length)]) return List.generate(length, (index) => chars[rand.nextInt(chars.length)]).join();
.join();
} }

View File

@ -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<void> createApp(PatrolIntegrationTester $) async {
// await app_main.main();
// await $.pumpAndSettle();
// }
void patrol(
String description,
Future<void> Function(PatrolIntegrationTester) callback, {
bool? skip,
List<String> tags = const [],
NativeAutomatorConfig? nativeAutomatorConfig,
LiveTestWidgetsFlutterBindingFramePolicy framePolicy =
LiveTestWidgetsFlutterBindingFramePolicy.fadePointers,
}) {
patrolTest(
description,
config: _patrolTesterConfig,
nativeAutomatorConfig: nativeAutomatorConfig ?? _nativeAutomatorConfig,
framePolicy: framePolicy,
skip: skip,
callback,
tags: tags,
);
}

View File

@ -46,13 +46,13 @@ class LocalsTest {
// } // }
// }, // },
// ); // );
patrolWidgetTest( patrol(
'Selecionar um local disponível com somente um local disponivel', // 'Selecionar um local disponível com somente um local disponivel', //
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole('Locals Test - Selecionar um local disponível'); $.tester.printToConsole('Locals Test - Selecionar um local disponível');
await _loggedWithSomeoneLocalAccount(false); await _loggedWithSomeoneLocalAccount($, false);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(MenuStaggeredView));
await $.waitUntilVisible($(LocalProfileComponentWidget)); await $.waitUntilVisible($(LocalProfileComponentWidget));
@ -184,14 +184,14 @@ class LocalsTest {
// // } // // }
// }, // },
// ); // );
patrolWidgetTest( patrol(
'Desvincular do local selecionado com somente um local disponivel', // 'Desvincular do local selecionado com somente um local disponivel', //
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole( $.tester.printToConsole(
'Locals Test - Desvincular do local selecionado com multiplos locais disponiveis'); 'Locals Test - Desvincular do local selecionado com multiplos locais disponiveis');
await _loggedWithSomeoneLocalAccount(); await _loggedWithSomeoneLocalAccount($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(MenuStaggeredView));
@ -247,13 +247,13 @@ class LocalsTest {
expect(entriesFinder, findsWidgets); expect(entriesFinder, findsWidgets);
}); });
patrolWidgetTest( patrol(
'Vincular um local desvinculado com somente um local disponivel', // 'Vincular um local desvinculado com somente um local disponivel', //
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole('Locals Test - Vincular um local desvinculado'); $.tester.printToConsole('Locals Test - Vincular um local desvinculado');
await _loggedWithSomeoneLocalAccount(false); await _loggedWithSomeoneLocalAccount($, false);
await $.pumpWidget(const App()); await $.pumpWidget(const App());
final PatrolFinder bottomSheetFinder = final PatrolFinder bottomSheetFinder =
@ -302,11 +302,11 @@ class LocalsTest {
} }
static Future attachLocal() async { static Future attachLocal() async {
patrolWidgetTest( patrol(
'Selecionar um local disponível com multíplos locais disponíveis', // 'Selecionar um local disponível com multíplos locais disponíveis', //
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
await _loggedWithMultiLocalsAccount(); await _loggedWithMultiLocalsAccount($);
await $.pumpWidget(const App()); await $.pumpWidget(const App());
late Map<String, String> credentials; late Map<String, String> credentials;
final PatrolFinder throwsException = $(''); final PatrolFinder throwsException = $('');
@ -337,11 +337,11 @@ class LocalsTest {
return; return;
}, },
); );
patrolWidgetTest( patrol(
'Selecionar um local disponível com somente um local disponível', // 'Selecionar um local disponível com somente um local disponível', //
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
await _loggedWithSomeoneLocalAccount(); await _loggedWithSomeoneLocalAccount($);
await $.pumpWidget(const App()); await $.pumpWidget(const App());
late Map<String, String> credentials; late Map<String, String> credentials;
final PatrolFinder throwsException = $(''); final PatrolFinder throwsException = $('');

View File

@ -2,15 +2,15 @@ part of 'app_test.dart';
class MenuTest { class MenuTest {
static Future labels2AppbarConsistency() async { static Future labels2AppbarConsistency() async {
patrolWidgetTest( patrol(
'As labels dos menuItems correspondem aos títulos das AppBars? (MultiLocais)', 'As labels dos menuItems correspondem aos títulos das AppBars? (MultiLocais)',
// //
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole( $.tester.printToConsole(
'Menu Test - As labels dos menuItems correspondem aos títulos das AppBars?'); 'Menu Test - As labels dos menuItems correspondem aos títulos das AppBars?');
await _loggedWithMultiLocalsAccount(); await _loggedWithMultiLocalsAccount($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(MenuStaggeredView));
@ -96,13 +96,13 @@ class MenuTest {
} }
static Future containEntries() async { static Future containEntries() async {
patrolWidgetTest( patrol(
'HomeMenu contém seus itens? (MultiLocais)', // 'HomeMenu contém seus itens? (MultiLocais)', //
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole('Menu Test - HomeMenu contém seus itens?'); $.tester.printToConsole('Menu Test - HomeMenu contém seus itens?');
await _loggedWithMultiLocalsAccount(); await _loggedWithMultiLocalsAccount($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(MenuStaggeredView));
@ -135,13 +135,13 @@ class MenuTest {
expect(entriesKey, containsAll(menuKeys)); expect(entriesKey, containsAll(menuKeys));
}, },
); );
patrolWidgetTest( patrol(
'HomeMenu contém seus itens? (MonoLocal)', // 'HomeMenu contém seus itens? (MonoLocal)', //
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole('Menu Test - HomeMenu contém seus itens?'); $.tester.printToConsole('Menu Test - HomeMenu contém seus itens?');
await _loggedWithSomeoneLocalAccount(); await _loggedWithSomeoneLocalAccount($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(MenuStaggeredView));
@ -175,13 +175,13 @@ class MenuTest {
}, },
); );
patrolWidgetTest( patrol(
'DrawerMenu contém seus itens? (MultiLocais)', // 'DrawerMenu contém seus itens? (MultiLocais)', //
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole('Menu Test - DrawerMenu contém seus itens?'); $.tester.printToConsole('Menu Test - DrawerMenu contém seus itens?');
await _loggedWithMultiLocalsAccount(); await _loggedWithMultiLocalsAccount($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(MenuStaggeredView));
@ -222,13 +222,13 @@ class MenuTest {
await Future.delayed(const Duration(milliseconds: 500)); await Future.delayed(const Duration(milliseconds: 500));
}, },
); );
patrolWidgetTest( patrol(
'DrawerMenu contém seus itens? (MonoLocal)', // 'DrawerMenu contém seus itens? (MonoLocal)', //
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole('Menu Test - DrawerMenu contém seus itens?'); $.tester.printToConsole('Menu Test - DrawerMenu contém seus itens?');
await _loggedWithSomeoneLocalAccount(); await _loggedWithSomeoneLocalAccount($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(MenuStaggeredView));
@ -272,13 +272,13 @@ class MenuTest {
} }
static Future navToEntries() async { static Future navToEntries() async {
patrolWidgetTest( patrol(
'Navegação entre items do Menu (MultiLocais)', 'Navegação entre items do Menu (MultiLocais)',
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole('Menu Test - Navegação entre items do Menu'); $.tester.printToConsole('Menu Test - Navegação entre items do Menu');
await _loggedWithMultiLocalsAccount(); await _loggedWithMultiLocalsAccount($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(MenuStaggeredView));

View File

@ -2,14 +2,13 @@ part of 'app_test.dart';
class ModularizationTest { class ModularizationTest {
static Future containLicense() async { static Future containLicense() async {
patrolWidgetTest( patrol('Os modulos de licença está sendo processados? (MultiLocais)',
'Os modulos de licença está sendo processados? (MultiLocais)', (PatrolIntegrationTester tester) async {
(PatrolTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole( $.tester.printToConsole(
'Modularization Test - Os modulos de licença está sendo processados?'); 'Modularization Test - Os modulos de licença está sendo processados?');
await _loggedWithMultiLocalsAccount(); await _loggedWithMultiLocalsAccount($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(MenuStaggeredView));
@ -28,14 +27,13 @@ class ModularizationTest {
return; return;
}); });
patrolWidgetTest( patrol('Os modulos de licença está sendo processados? (MonoLocal)',
'Os modulos de licença está sendo processados? (MonoLocal)', (PatrolIntegrationTester tester) async {
(PatrolTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole( $.tester.printToConsole(
'Modularization Test - Os modulos de licença está sendo processados?'); 'Modularization Test - Os modulos de licença está sendo processados?');
await _loggedWithSomeoneLocalAccount(); await _loggedWithSomeoneLocalAccount($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(MenuStaggeredView));
@ -57,13 +55,13 @@ class ModularizationTest {
} }
static Future switchLicense() async { static Future switchLicense() async {
patrolWidgetTest( patrol(
'Licença está sendo atualizada?', 'Licença está sendo atualizada?',
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole('Licença está sendo atualizada?'); $.tester.printToConsole('Licença está sendo atualizada?');
await _loggedWithMultiLocalsAccount(); await _loggedWithMultiLocalsAccount($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(MenuStaggeredView));

View File

@ -9,7 +9,7 @@ import 'package:patrol/src/native/contracts/contracts.dart';
import 'package:test_api/src/backend/invoker.dart'; import 'package:test_api/src/backend/invoker.dart';
// START: GENERATED TEST IMPORTS // START: GENERATED TEST IMPORTS
import 'app_test.dart' as app_test; import 'app_test.dart' as __app_test;
// END: GENERATED TEST IMPORTS // END: GENERATED TEST IMPORTS
Future<void> main() async { Future<void> main() async {
@ -31,7 +31,7 @@ Future<void> main() async {
// When running on iOS, the native side of Patrol (specifically: the // When running on iOS, the native side of Patrol (specifically: the
// PATROL_INTEGRATION_TEST_IOS_RUNNER macro) makes an initial run to gather // 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 // 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 // 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 // native test cases from them. On Android, this is done using the
@ -69,7 +69,7 @@ Future<void> main() async {
}); });
// START: GENERATED TEST GROUPS // START: GENERATED TEST GROUPS
group('app_test', app_test.main); group('.app_test', __app_test.main);
// END: GENERATED TEST GROUPS // END: GENERATED TEST GROUPS
final dartTestGroup = await testExplorationCompleter.future; final dartTestGroup = await testExplorationCompleter.future;

View File

@ -1,8 +1,8 @@
part of 'app_test.dart'; part of 'app_test.dart';
Future<void> _loggedWithMultiLocalsAccount( Future<void> _loggedWithMultiLocalsAccount(PatrolIntegrationTester $,
[bool forceLinkedLocal = true]) async { [bool forceLinkedLocal = true]) async {
await initializeApp(); await _init($);
await StorageHelper() // await StorageHelper() //
.set(SecureStorageKey.isLogged.value, 'true'); .set(SecureStorageKey.isLogged.value, 'true');
await StorageHelper() // await StorageHelper() //
@ -29,9 +29,9 @@ Future<void> _loggedWithMultiLocalsAccount(
} }
} }
Future<void> _loggedWithSomeoneLocalAccount( Future<void> _loggedWithSomeoneLocalAccount(PatrolIntegrationTester $,
[bool forceLinkedLocal = true]) async { [bool forceLinkedLocal = true]) async {
await initializeApp(); await _init($);
await StorageHelper() // await StorageHelper() //
.set(SecureStorageKey.isLogged.value, 'true'); .set(SecureStorageKey.isLogged.value, 'true');
await StorageHelper() // await StorageHelper() //
@ -58,8 +58,8 @@ Future<void> _loggedWithSomeoneLocalAccount(
} }
} }
Future<void> _unlogged() async { Future<void> _unlogged(PatrolIntegrationTester $) async {
await initializeApp(); await _init($);
await StorageHelper() // await StorageHelper() //
.set(SecureStorageKey.isLogged.value, 'false'); .set(SecureStorageKey.isLogged.value, 'false');
await StorageHelper() // await StorageHelper() //
@ -78,12 +78,24 @@ Future<void> _unlogged() async {
.set(LocalsStorageKey.isNewVersion.key, true); .set(LocalsStorageKey.isNewVersion.key, true);
} }
Future<void> _navigateToSignIn(PatrolTester $) async { Future<void> _init(PatrolIntegrationTester $) async {
WidgetsFlutterBinding.ensureInitialized();
await _initializeTracking();
await _initializeStorage();
await _initializeFirebase();
await _initializeNotificationService();
_initializeUrlStrategy();
_initializeSystemSettings();
await _initializeFlutterFlow();
await _initializeNav();
}
Future<void> _navigateToSignIn(PatrolIntegrationTester $) async {
final signInButton = $(#toggleSignInPage).waitUntilVisible(); final signInButton = $(#toggleSignInPage).waitUntilVisible();
await signInButton.tap(); await signInButton.tap();
} }
Future<void> _navigateToSignUp(PatrolTester $) async { Future<void> _navigateToSignUp(PatrolIntegrationTester $) async {
final signUpButton = $(#toggleSignUpPage).waitUntilVisible(); final signUpButton = $(#toggleSignUpPage).waitUntilVisible();
await signUpButton.tap(); await signUpButton.tap();
} }
@ -91,3 +103,61 @@ Future<void> _navigateToSignUp(PatrolTester $) async {
Future<void> _navigateBackUsingSystemGesture() async => Future<void> _navigateBackUsingSystemGesture() async =>
IntegrationTestWidgetsFlutterBinding.instance.keyboard IntegrationTestWidgetsFlutterBinding.instance.keyboard
.isLogicalKeyPressed(LogicalKeyboardKey.escape); .isLogicalKeyPressed(LogicalKeyboardKey.escape);
Future<void> _initializeTracking() async {
print('Requesting tracking authorization...');
await AppTrackingTransparency.requestTrackingAuthorization();
print('Tracking authorization requested');
}
Future<void> _initializeFirebase() async {
print('Initializing Firebase...');
await Firebase.initializeApp();
print('Firebase initialized');
}
Future<void> _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<void> _initializeFlutterFlow() async {
print('Initializing FlutterFlow...');
await FlutterFlowTheme.initialize();
await FFLocalizations.initialize();
print('FlutterFlow initialized');
}
Future<void> _initializeNav() async {
print('Initializing Nav...');
GoRouter.optionURLReflectsImperativeAPIs = true;
usePathUrlStrategy();
print('Nav initialized');
}
Future<void> _initializeStorage() async {
await StorageHelper().init();
}

View File

@ -2,13 +2,14 @@ part of 'app_test.dart';
class WelcomeTest { class WelcomeTest {
static Future signInToSignUp() async { static Future signInToSignUp() async {
patrolWidgetTest( patrol(
'Sign-In to Sign-Up', 'Sign-In to Sign-Up',
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole('Welcome Test - Sign-In to Sign-Up'); $.tester.printToConsole('Welcome Test - Sign-In to Sign-Up');
await _unlogged(); await _unlogged($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await _navigateToSignIn($); await _navigateToSignIn($);
await _navigateToSignUp($); await _navigateToSignUp($);
}, },
@ -16,12 +17,12 @@ class WelcomeTest {
} }
static Future signUpToSignIn() async { static Future signUpToSignIn() async {
patrolWidgetTest( patrol(
'Sign-Up to Sign-In', 'Sign-Up to Sign-In',
(PatrolTester tester) async { (PatrolIntegrationTester tester) async {
$ = tester; $ = tester;
$.tester.printToConsole('Welcome Test - Sign-Up to Sign-In'); $.tester.printToConsole('Welcome Test - Sign-Up to Sign-In');
await _unlogged(); await _unlogged($);
await $.pumpWidgetAndSettle(const App()); await $.pumpWidgetAndSettle(const App());
await _navigateToSignUp($); await _navigateToSignUp($);
await _navigateToSignIn($); await _navigateToSignIn($);

View File

@ -19,12 +19,10 @@ class ForgotPasswordTemplateComponentWidget extends StatefulWidget {
const ForgotPasswordTemplateComponentWidget({super.key}); const ForgotPasswordTemplateComponentWidget({super.key});
@override @override
State<ForgotPasswordTemplateComponentWidget> createState() => State<ForgotPasswordTemplateComponentWidget> createState() => _ForgotPasswordTemplateComponentWidgetState();
_ForgotPasswordTemplateComponentWidgetState();
} }
class _ForgotPasswordTemplateComponentWidgetState class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTemplateComponentWidget> {
extends State<ForgotPasswordTemplateComponentWidget> {
late ForgotPasswordTemplateComponentModel _model; late ForgotPasswordTemplateComponentModel _model;
@override @override
@ -51,13 +49,12 @@ class _ForgotPasswordTemplateComponentWidgetState
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double limitedSubHeaderFontSize = double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
LimitedFontSizeUtil.getSubHeaderFontSize(context);
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
double limitedHeaderFontSize = double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
LimitedFontSizeUtil.getHeaderFontSize(context);
return Align( return Align(
key: ValueKey('ForgotPasswordTemplateComponentWidget'),
alignment: const AlignmentDirectional(0.0, 1.0), alignment: const AlignmentDirectional(0.0, 1.0),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
@ -87,8 +84,7 @@ class _ForgotPasswordTemplateComponentWidgetState
tablet: false, tablet: false,
)) ))
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
16.0, 0.0, 16.0, 8.0),
child: InkWell( child: InkWell(
key: const ValueKey<String>('BackButton'), key: const ValueKey<String>('BackButton'),
splashColor: Colors.transparent, splashColor: Colors.transparent,
@ -102,8 +98,7 @@ class _ForgotPasswordTemplateComponentWidgetState
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
const Padding( const Padding(
padding: EdgeInsetsDirectional.fromSTEB( padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
0.0, 12.0, 0.0, 12.0),
child: Icon( child: Icon(
Icons.arrow_back_rounded, Icons.arrow_back_rounded,
color: Color(0xFF15161E), color: Color(0xFF15161E),
@ -111,20 +106,16 @@ class _ForgotPasswordTemplateComponentWidgetState
), ),
), ),
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
12.0, 0.0, 0.0, 0.0),
child: Text( child: Text(
'', '',
style: FlutterFlowTheme.of(context) style: FlutterFlowTheme.of(context).bodyMedium.override(
.bodyMedium
.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
color: const Color(0xFF15161E), color: const Color(0xFF15161E),
fontSize: limitedHeaderFontSize, fontSize: limitedHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
), ),
), ),
@ -133,36 +124,30 @@ class _ForgotPasswordTemplateComponentWidgetState
), ),
), ),
Padding( Padding(
padding: padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
child: Text( child: Text(
FFLocalizations.of(context) FFLocalizations.of(context).getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
.getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
style: FlutterFlowTheme.of(context).headlineMedium.override( style: FlutterFlowTheme.of(context).headlineMedium.override(
fontFamily: 'Outfit', fontFamily: 'Outfit',
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: limitedHeaderFontSize, fontSize: limitedHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
GoogleFonts.asMap().containsKey('Outfit'),
), ),
), ),
), ),
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
16.0, 4.0, 16.0, 4.0),
child: Text( child: Text(
FFLocalizations.of(context).getText( FFLocalizations.of(context).getText('wu2f7yzo' /* Não se preucupe nós vamos te a... */),
'wu2f7yzo' /* Não se preucupe nós vamos te a... */),
style: FlutterFlowTheme.of(context).labelMedium.override( style: FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: limitedSubHeaderFontSize, fontSize: limitedSubHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
), ),
), ),
@ -170,8 +155,7 @@ class _ForgotPasswordTemplateComponentWidgetState
key: _model.formKey, key: _model.formKey,
autovalidateMode: AutovalidateMode.onUserInteraction, autovalidateMode: AutovalidateMode.onUserInteraction,
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
16.0, 12.0, 16.0, 0.0),
child: SizedBox( child: SizedBox(
width: double.infinity, width: double.infinity,
child: TextFormField( child: TextFormField(
@ -188,18 +172,15 @@ class _ForgotPasswordTemplateComponentWidgetState
obscureText: false, obscureText: false,
decoration: InputDecoration( decoration: InputDecoration(
isDense: true, isDense: true,
labelText: FFLocalizations.of(context) labelText: FFLocalizations.of(context).getText('mtz8l7ft' /* E-mail */),
.getText('mtz8l7ft' /* E-mail */), labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
labelStyle: fontFamily: 'Plus Jakarta Sans',
FlutterFlowTheme.of(context).labelMedium.override( color: FlutterFlowTheme.of(context).primary,
fontFamily: 'Plus Jakarta Sans', fontSize: limitedInputFontSize,
color: FlutterFlowTheme.of(context).primary, letterSpacing: 0.0,
fontSize: limitedInputFontSize, fontWeight: FontWeight.w500,
letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
fontWeight: FontWeight.w500, ),
useGoogleFonts: GoogleFonts.asMap()
.containsKey('Plus Jakarta Sans'),
),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: const BorderSide( borderSide: const BorderSide(
color: Colors.black, color: Colors.black,
@ -228,8 +209,7 @@ class _ForgotPasswordTemplateComponentWidgetState
), ),
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
), ),
contentPadding: const EdgeInsetsDirectional.fromSTEB( contentPadding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0),
24.0, 24.0, 20.0, 24.0),
suffixIcon: Icon( suffixIcon: Icon(
Icons.email, Icons.email,
color: FlutterFlowTheme.of(context).primary, color: FlutterFlowTheme.of(context).primary,
@ -242,14 +222,12 @@ class _ForgotPasswordTemplateComponentWidgetState
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
maxLines: null, maxLines: null,
keyboardType: TextInputType.emailAddress, keyboardType: TextInputType.emailAddress,
cursorColor: FlutterFlowTheme.of(context).primary, cursorColor: FlutterFlowTheme.of(context).primary,
validator: _model.emailAddressTextControllerValidator validator: _model.emailAddressTextControllerValidator.asValidator(context),
.asValidator(context),
), ),
), ),
), ),
@ -257,17 +235,13 @@ class _ForgotPasswordTemplateComponentWidgetState
Align( Align(
alignment: const AlignmentDirectional(0.0, 0.0), alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
0.0, 24.0, 0.0, 0.0),
child: FFButtonWidget( child: FFButtonWidget(
key: const ValueKey<String>('SendButtonWidget'), key: const ValueKey<String>('SendButtonWidget'),
onPressed: (_model.emailAddressTextController.text == onPressed: (_model.emailAddressTextController.text == '' ||
'' || !ValidatorUtil.isValidEmail(_model.emailAddressTextController.text))
!ValidatorUtil.isValidEmail(
_model.emailAddressTextController.text))
? null ? null
: () async => : () async => await AuthenticationService.forgotPassword(
await AuthenticationService.forgotPassword(
context, context,
_model.emailAddressTextController.text, _model.emailAddressTextController.text,
).then((v) => v == true ? context.pop() : null), ).then((v) => v == true ? context.pop() : null),
@ -277,28 +251,23 @@ class _ForgotPasswordTemplateComponentWidgetState
options: FFButtonOptions( options: FFButtonOptions(
width: 270.0, width: 270.0,
height: 50.0, height: 50.0,
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
0.0, 0.0, 0.0, 0.0), iconPadding: 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, color: FlutterFlowTheme.of(context).primary,
textStyle: textStyle: FlutterFlowTheme.of(context).titleSmall.override(
FlutterFlowTheme.of(context).titleSmall.override( fontFamily: 'Plus Jakarta Sans',
fontFamily: 'Plus Jakarta Sans', color: Colors.white,
color: Colors.white, fontSize: limitedInputFontSize,
fontSize: limitedInputFontSize, letterSpacing: 0.0,
letterSpacing: 0.0, fontWeight: FontWeight.w500,
fontWeight: FontWeight.w500, useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
useGoogleFonts: GoogleFonts.asMap() ),
.containsKey('Plus Jakarta Sans'),
),
elevation: 3.0, elevation: 3.0,
borderSide: const BorderSide( borderSide: const BorderSide(
color: Colors.transparent, color: Colors.transparent,
width: 1.0, width: 1.0,
), ),
disabledColor: disabledColor: FlutterFlowTheme.of(context).customColor5,
FlutterFlowTheme.of(context).customColor5,
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
), ),
showLoadingIndicator: true, showLoadingIndicator: true,

View File

@ -59,11 +59,14 @@ class DeepLinkService {
context: navigatorKey.currentContext!, context: navigatorKey.currentContext!,
builder: (context) => Padding( builder: (context) => Padding(
padding: MediaQuery.viewInsetsOf(context), padding: MediaQuery.viewInsetsOf(context),
child: ForgotPasswordScreen(email: email, token: token), child: ForgotPasswordScreen(
key: ValueKey('ForgotPasswordScreen'),
email: email,
token: token,
),
), ),
isScrollControlled: true, isScrollControlled: true,
backgroundColor: FlutterFlowTheme.of(navigatorKey.currentContext!) backgroundColor: FlutterFlowTheme.of(navigatorKey.currentContext!).primaryBackground,
.primaryBackground,
showDragHandle: true, showDragHandle: true,
useSafeArea: true, useSafeArea: true,
enableDrag: true, enableDrag: true,

View File

@ -260,7 +260,7 @@ Future<void> onMessageReceived(
} }
class NotificationService { class NotificationService {
static Future<void> initialize() async { static Future<void> initialize([bool forceRequest = true]) async {
await AwesomeNotifications().initialize( await AwesomeNotifications().initialize(
'resource://drawable/notification_icon', 'resource://drawable/notification_icon',
[ [
@ -296,7 +296,8 @@ class NotificationService {
if (isAllowed == false) { if (isAllowed == false) {
await StorageHelper() await StorageHelper()
.set(LocalsStorageKey.requestOSNotification.key, true); .set(LocalsStorageKey.requestOSNotification.key, true);
await AwesomeNotifications().requestPermissionToSendNotifications(); if (forceRequest == true)
await AwesomeNotifications().requestPermissionToSendNotifications();
} }
} }
return; return;

View File

@ -86,20 +86,11 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
builder: (context, _) { builder: (context, _) {
return FutureBuilder<Widget>( return FutureBuilder<Widget>(
future: () async { future: () async {
final bool isLogged = final bool isLogged = await StorageHelper().get(SecureStorageKey.isLogged.value) == 'true';
await StorageHelper().get(SecureStorageKey.isLogged.value) == final bool haveLocal = await StorageHelper().get(SecureStorageKey.haveLocal.value) == 'true';
'true';
final bool haveLocal =
await StorageHelper().get(SecureStorageKey.haveLocal.value) ==
'true';
final bool haveUserUUID = final bool haveUserUUID =
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) (await StorageHelper().get(ProfileStorageKey.userUUID.key))?.isNotEmpty ?? false;
?.isNotEmpty ?? final bool haveDevUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key))?.isNotEmpty ?? false;
false;
final bool haveDevUUID =
(await StorageHelper().get(ProfileStorageKey.devUUID.key))
?.isNotEmpty ??
false;
if (isLogged && haveDevUUID && haveUserUUID) { if (isLogged && haveDevUUID && haveUserUUID) {
return haveLocal return haveLocal
@ -109,20 +100,17 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
create: (context) => MenuBloc( create: (context) => MenuBloc(
style: MenuView.list_grid, style: MenuView.list_grid,
item: EnumMenuItem.button, item: EnumMenuItem.button,
entries: MenuEntry.getEntriesByType( entries: MenuEntry.getEntriesByType(MenuEntryType.Home),
MenuEntryType.Home),
)..add(MenuEvent()), )..add(MenuEvent()),
), ),
BlocProvider<HomeBloc>( BlocProvider<HomeBloc>(
create: (context) => HomeBloc()..add(HomeEvent()), create: (context) => HomeBloc()..add(HomeEvent()),
), ),
BlocProvider( BlocProvider(
create: (context) => create: (context) => LocalProfileBloc()..add(LocalProfileEvent()),
LocalProfileBloc()..add(LocalProfileEvent()),
), ),
], ],
child: HomePageWidget( child: HomePageWidget(key: UniqueKey(), LocalsRepositoryImpl().update),
key: UniqueKey(), LocalsRepositoryImpl().update),
) )
: const ReceptionPageWidget(); : const ReceptionPageWidget();
} else { } else {
@ -146,13 +134,11 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
name: 'forgotPassword', name: 'forgotPassword',
path: '/forgotPassword', path: '/forgotPassword',
builder: (context, params) { builder: (context, params) {
late final String email = late final String email = params.getParam('email', ParamType.String);
params.getParam('email', ParamType.String); late final String token = params.getParam('token', ParamType.String);
late final String token =
params.getParam('token', ParamType.String);
return ForgotPasswordScreen( return ForgotPasswordScreen(
key: UniqueKey(), key: ValueKey('ForgotPasswordScreen'),
email: email, email: email,
token: token, token: token,
); );
@ -166,8 +152,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
name: 'homePage', name: 'homePage',
path: '/homePage', path: '/homePage',
builder: (context, params) { builder: (context, params) {
final Future<bool> Function(BuildContext context)? update = final Future<bool> Function(BuildContext context)? update = params.getParam('update', ParamType.Function);
params.getParam('update', ParamType.Function);
return MultiBlocProvider( return MultiBlocProvider(
providers: [ providers: [
BlocProvider( BlocProvider(
@ -181,8 +166,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
create: (context) => HomeBloc()..add(HomeEvent()), create: (context) => HomeBloc()..add(HomeEvent()),
), ),
BlocProvider( BlocProvider(
create: (context) => create: (context) => LocalProfileBloc()..add(LocalProfileEvent()),
LocalProfileBloc()..add(LocalProfileEvent()),
), ),
], ],
child: HomePageWidget(key: UniqueKey(), update), child: HomePageWidget(key: UniqueKey(), update),
@ -191,16 +175,12 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
FFRoute( FFRoute(
name: 'petsOnThePropertyPage', name: 'petsOnThePropertyPage',
path: '/petsOnThePropertyPage', path: '/petsOnThePropertyPage',
builder: (context, params) => builder: (context, params) => Scaffold(body: const PetsHistoryScreen(isApp: true))),
Scaffold(body: const PetsHistoryScreen(isApp: true))),
FFRoute( FFRoute(
name: 'vehiclesOnThePropertyPage', name: 'vehiclesOnThePropertyPage',
path: '/vehiclesOnThePropertyPage', path: '/vehiclesOnThePropertyPage',
builder: (context, params) => const VehicleOnTheProperty()), builder: (context, params) => const VehicleOnTheProperty()),
FFRoute( FFRoute(name: 'receptionPage', path: '/receptionPage', builder: (context, params) => const ReceptionPageWidget()),
name: 'receptionPage',
path: '/receptionPage',
builder: (context, params) => const ReceptionPageWidget()),
FFRoute( FFRoute(
name: 'messageHistoryPage', name: 'messageHistoryPage',
path: '/messageHistoryPage', path: '/messageHistoryPage',
@ -212,28 +192,19 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
FFRoute( FFRoute(
name: 'scheduleCompleteVisitPage', name: 'scheduleCompleteVisitPage',
path: '/scheduleCompleteVisitPage', path: '/scheduleCompleteVisitPage',
builder: (context, params) => builder: (context, params) => const ScheduleCompleteVisitPageWidget()),
const ScheduleCompleteVisitPageWidget()),
FFRoute( FFRoute(
name: 'deliverySchedule', name: 'deliverySchedule', path: '/deliverySchedule', builder: (context, params) => const DeliverySchedule()),
path: '/deliverySchedule',
builder: (context, params) => const DeliverySchedule()),
FFRoute( FFRoute(
name: 'provisionalSchedule', name: 'provisionalSchedule',
path: '/provisionalSchedule', path: '/provisionalSchedule',
builder: (context, params) => const ProvisionalSchedule()), builder: (context, params) => const ProvisionalSchedule()),
FFRoute( FFRoute(name: 'fastPassPage', path: '/fastPassPage', builder: (context, params) => FastPassPageWidget()),
name: 'fastPassPage',
path: '/fastPassPage',
builder: (context, params) => FastPassPageWidget()),
FFRoute( FFRoute(
name: 'preferencesSettings', name: 'preferencesSettings',
path: '/preferencesSettings', path: '/preferencesSettings',
builder: (context, params) => PreferencesPageWidget()), builder: (context, params) => PreferencesPageWidget()),
FFRoute( FFRoute(name: 'aboutProperty', path: '/aboutProperty', builder: (context, params) => AboutPropertyPage()),
name: 'aboutProperty',
path: '/aboutProperty',
builder: (context, params) => AboutPropertyPage()),
FFRoute( FFRoute(
name: 'residentsOnThePropertyPage', name: 'residentsOnThePropertyPage',
path: '/residentsOnThePropertyPage', path: '/residentsOnThePropertyPage',
@ -249,11 +220,8 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
FFRoute( FFRoute(
name: 'acessHistoryPage', name: 'acessHistoryPage',
path: '/acessHistoryPage', path: '/acessHistoryPage',
builder: (context, params) => AccessHistoryScreen(opt: const { builder: (context, params) =>
'personType': '.*', AccessHistoryScreen(opt: const {'personType': '.*', 'accessType': '.*', 'search': '.*'})),
'accessType': '.*',
'search': '.*'
})),
FFRoute( FFRoute(
name: 'provisionalHistoryPage', name: 'provisionalHistoryPage',
path: '/provisionalHistoryPage', path: '/provisionalHistoryPage',
@ -262,34 +230,13 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
name: 'liberationHistory', name: 'liberationHistory',
path: '/liberationHistory', path: '/liberationHistory',
builder: (context, params) => const LiberationHistoryWidget()), builder: (context, params) => const LiberationHistoryWidget()),
FFRoute( FFRoute(name: 'signInPage', path: '/signInPage', builder: (context, params) => const SignInPageWidget()),
name: 'signInPage', FFRoute(name: 'signUpPage', path: '/signUpPage', builder: (context, params) => const SignUpPageWidget()),
path: '/signInPage', FFRoute(name: 'welcomePage', path: '/welcomePage', builder: (context, params) => const WelcomePage()),
builder: (context, params) => const SignInPageWidget()), FFRoute(name: 'qrCodePage', path: '/qrCodePage', builder: (context, params) => const QrCodePageWidget()),
FFRoute( FFRoute(name: 'preferencesPage', path: '/preferencesPage', builder: (context, params) => PreferencesPageWidget()),
name: 'signUpPage', FFRoute(name: 'packageOrder', path: '/packageOrder', builder: (context, params) => const PackageOrderPage()),
path: '/signUpPage', FFRoute(name: 'reservation', path: '/reservation', builder: (context, params) => ReservationPageWidget()),
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( FFRoute(
name: 'petsPage', name: 'petsPage',
path: '/petsPage', path: '/petsPage',
@ -305,9 +252,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
extension NavParamExtensions on Map<String, String?> { extension NavParamExtensions on Map<String, String?> {
Map<String, String> get withoutNulls => Map.fromEntries( Map<String, String> get withoutNulls => Map.fromEntries(
entries entries.where((e) => e.value != null).map((e) => MapEntry(e.key, e.value!)),
.where((e) => e.value != null)
.map((e) => MapEntry(e.key, e.value!)),
); );
} }
@ -321,8 +266,7 @@ extension NavigationExtensions on BuildContext {
} }
extension _GoRouterStateExtensions on GoRouterState { extension _GoRouterStateExtensions on GoRouterState {
Map<String, dynamic> get extraMap => Map<String, dynamic> get extraMap => extra != null ? extra as Map<String, dynamic> : {};
extra != null ? extra as Map<String, dynamic> : {};
Map<String, dynamic> get allParams => <String, dynamic>{} Map<String, dynamic> get allParams => <String, dynamic>{}
..addAll(pathParameters) ..addAll(pathParameters)
..addAll(uri.queryParameters) ..addAll(uri.queryParameters)
@ -335,9 +279,8 @@ extension _GoRouterStateExtensions on GoRouterState {
extension GoRouterLocationExtension on GoRouter { extension GoRouterLocationExtension on GoRouter {
String getCurrentLocation() { String getCurrentLocation() {
final RouteMatch lastMatch = routerDelegate.currentConfiguration.last; final RouteMatch lastMatch = routerDelegate.currentConfiguration.last;
final RouteMatchList matchList = lastMatch is ImperativeRouteMatch final RouteMatchList matchList =
? lastMatch.matches lastMatch is ImperativeRouteMatch ? lastMatch.matches : routerDelegate.currentConfiguration;
: routerDelegate.currentConfiguration;
return matchList.uri.toString(); return matchList.uri.toString();
} }
} }
@ -350,17 +293,13 @@ class FFParameters {
Map<String, dynamic> futureParamValues = {}; Map<String, dynamic> futureParamValues = {};
bool get isEmpty => bool get isEmpty =>
state.allParams.isEmpty || state.allParams.isEmpty || (state.allParams.length == 1 && state.extraMap.containsKey(kTransitionInfoKey));
(state.allParams.length == 1 && bool isAsyncParam(MapEntry<String, dynamic> param) => asyncParams.containsKey(param.key) && param.value is String;
state.extraMap.containsKey(kTransitionInfoKey));
bool isAsyncParam(MapEntry<String, dynamic> param) =>
asyncParams.containsKey(param.key) && param.value is String;
bool get hasFutures => state.allParams.entries.any(isAsyncParam); bool get hasFutures => state.allParams.entries.any(isAsyncParam);
Future<bool> completeFutures() => Future.wait( Future<bool> completeFutures() => Future.wait(
state.allParams.entries.where(isAsyncParam).map( state.allParams.entries.where(isAsyncParam).map(
(param) async { (param) async {
final doc = await asyncParams[param.key]!(param.value) final doc = await asyncParams[param.key]!(param.value).onError((_, __) => null);
.onError((_, __) => null);
if (doc != null) { if (doc != null) {
futureParamValues[param.key] = doc; futureParamValues[param.key] = doc;
return true; return true;
@ -370,15 +309,12 @@ class FFParameters {
), ),
).onError((_, __) => [false]).then((v) => v.every((e) => e)); ).onError((_, __) => [false]).then((v) => v.every((e) => e));
dynamic getParam<T>(String paramName, ParamType type, dynamic getParam<T>(String paramName, ParamType type, {bool isList = false, StructBuilder<T>? structBuilder}) {
{bool isList = false, StructBuilder<T>? structBuilder}) { if (futureParamValues.containsKey(paramName)) return futureParamValues[paramName];
if (futureParamValues.containsKey(paramName))
return futureParamValues[paramName];
if (!state.allParams.containsKey(paramName)) return null; if (!state.allParams.containsKey(paramName)) return null;
final param = state.allParams[paramName]; final param = state.allParams[paramName];
if (param is! String) return param; if (param is! String) return param;
return deserializeParam<T>(param, type, isList, return deserializeParam<T>(param, type, isList, structBuilder: structBuilder);
structBuilder: structBuilder);
} }
} }
@ -418,16 +354,13 @@ class FFRoute {
key: state.pageKey, key: state.pageKey,
child: child, child: child,
transitionDuration: transitionInfo.duration, transitionDuration: transitionInfo.duration,
transitionsBuilder: transitionsBuilder: (context, animation, secondaryAnimation, child) => PageTransition(
(context, animation, secondaryAnimation, child) =>
PageTransition(
type: transitionInfo.transitionType, type: transitionInfo.transitionType,
duration: transitionInfo.duration, duration: transitionInfo.duration,
reverseDuration: transitionInfo.duration, reverseDuration: transitionInfo.duration,
alignment: transitionInfo.alignment, alignment: transitionInfo.alignment,
child: child, child: child,
).buildTransitions( ).buildTransitions(context, animation, secondaryAnimation, child),
context, animation, secondaryAnimation, child),
) )
: MaterialPage(key: state.pageKey, child: child); : MaterialPage(key: state.pageKey, child: child);
}, },
@ -448,8 +381,7 @@ class TransitionInfo {
final Duration duration; final Duration duration;
final Alignment? alignment; final Alignment? alignment;
static TransitionInfo appDefault() => static TransitionInfo appDefault() => const TransitionInfo(hasTransition: false);
const TransitionInfo(hasTransition: false);
} }
class RootPageContext { class RootPageContext {
@ -461,9 +393,7 @@ class RootPageContext {
final rootPageContext = context.read<RootPageContext?>(); final rootPageContext = context.read<RootPageContext?>();
final isRootPage = rootPageContext?.isRootPage ?? false; final isRootPage = rootPageContext?.isRootPage ?? false;
final location = GoRouterState.of(context).uri.toString(); final location = GoRouterState.of(context).uri.toString();
return isRootPage && return isRootPage && location != '/' && location != rootPageContext?.errorRoute;
location != '/' &&
location != rootPageContext?.errorRoute;
} }
static Widget wrap(Widget child, {String? errorRoute}) => static Widget wrap(Widget child, {String? errorRoute}) =>

View File

@ -15,8 +15,7 @@ import '../../flutter_flow/internationalization.dart';
import 'forgot_password_model.dart'; import 'forgot_password_model.dart';
class ForgotPasswordScreen extends StatefulWidget { class ForgotPasswordScreen extends StatefulWidget {
const ForgotPasswordScreen( const ForgotPasswordScreen({super.key, required this.email, required this.token});
{super.key, required this.email, required this.token});
final String email; final String email;
final String token; final String token;
@ -24,8 +23,7 @@ class ForgotPasswordScreen extends StatefulWidget {
State<ForgotPasswordScreen> createState() => _ForgotPasswordScreenState(); State<ForgotPasswordScreen> createState() => _ForgotPasswordScreenState();
} }
class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> with TickerProviderStateMixin {
with TickerProviderStateMixin {
late ForgotPasswordScreenModel _model; late ForgotPasswordScreenModel _model;
final animationsMap = <String, AnimationInfo>{}; final animationsMap = <String, AnimationInfo>{};
@ -116,6 +114,7 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen>
}, },
), ),
title: Text( title: Text(
key: ValueKey('ForgotPasswordText'),
FFLocalizations.of(context).getVariableText( FFLocalizations.of(context).getVariableText(
ptText: 'Recuperar Senha', ptText: 'Recuperar Senha',
enText: 'Recover Password', enText: 'Recover Password',
@ -149,8 +148,7 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen>
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Padding( child: Padding(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0, bottom: 0.0),
left: 15.0, right: 15.0, top: 10.0, bottom: 0.0),
child: Container( child: Container(
width: double.infinity, width: double.infinity,
constraints: const BoxConstraints(maxWidth: 570.0), constraints: const BoxConstraints(maxWidth: 570.0),
@ -159,8 +157,7 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen>
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(left: 20.0, right: 20.0, top: 10.0, bottom: 0.0),
left: 20.0, right: 20.0, top: 10.0, bottom: 0.0),
child: Column( child: Column(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -174,25 +171,21 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen>
fontSize: 24.0, fontSize: 24.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
GoogleFonts.asMap().containsKey('Nunito'),
), ),
)), )),
Align( Align(
alignment: const AlignmentDirectional(-1.0, 0.0), alignment: const AlignmentDirectional(-1.0, 0.0),
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(20.0, 24.0, 0.0, 30.0),
20.0, 24.0, 0.0, 30.0),
child: Text( child: Text(
message, message,
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context).bodyMedium.override( style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
FlutterFlowTheme.of(context).bodyMediumFamily,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
useGoogleFonts: GoogleFonts.asMap().containsKey( useGoogleFonts:
FlutterFlowTheme.of(context) GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
.bodyMediumFamily),
), ),
), ),
), ),
@ -208,42 +201,32 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen>
controller: _model.passwordRegisterFormTextController, controller: _model.passwordRegisterFormTextController,
focusNode: _model.passwordRegisterFormFocusNode, focusNode: _model.passwordRegisterFormFocusNode,
visibility: _model.passwordRegisterFormVisibility, visibility: _model.passwordRegisterFormVisibility,
onVisibilityToggle: () => setState(() => onVisibilityToggle: () => setState(
_model.passwordRegisterFormVisibility = () => _model.passwordRegisterFormVisibility = !_model.passwordRegisterFormVisibility),
!_model.passwordRegisterFormVisibility), label:
label: FFLocalizations.of(context).getVariableText( FFLocalizations.of(context).getVariableText(ptText: 'Nova Senha', enText: 'New Password'),
ptText: 'Nova Senha', enText: 'New Password'), hint: FFLocalizations.of(context)
hint: FFLocalizations.of(context).getVariableText( .getVariableText(ptText: 'Insira sua senha', enText: 'Enter your password'),
ptText: 'Insira sua senha', asValidator: _model.passwordRegisterFormTextControllerValidator.asValidator(context),
enText: 'Enter your password'),
asValidator: _model
.passwordRegisterFormTextControllerValidator
.asValidator(context),
), ),
_buildPasswordField( _buildPasswordField(
context, context,
controller: _model.passwordConfirmFormTextController, controller: _model.passwordConfirmFormTextController,
focusNode: _model.passwordConfirmFormFocusNode, focusNode: _model.passwordConfirmFormFocusNode,
visibility: _model.passwordConfirmFormVisibility, visibility: _model.passwordConfirmFormVisibility,
onVisibilityToggle: () => setState(() => onVisibilityToggle: () => setState(
_model.passwordConfirmFormVisibility = () => _model.passwordConfirmFormVisibility = !_model.passwordConfirmFormVisibility),
!_model.passwordConfirmFormVisibility), label: FFLocalizations.of(context)
label: FFLocalizations.of(context).getVariableText( .getVariableText(ptText: 'Confirme a Senha', enText: 'Confirm Password'),
ptText: 'Confirme a Senha', hint: FFLocalizations.of(context)
enText: 'Confirm Password'), .getVariableText(ptText: 'Confirme sua senha', enText: 'Confirm your password'),
hint: FFLocalizations.of(context).getVariableText( asValidator: _model.passwordConfirmFormTextControllerValidator.asValidator(context),
ptText: 'Confirme sua senha',
enText: 'Confirm your password'),
asValidator: _model
.passwordConfirmFormTextControllerValidator
.asValidator(context),
), ),
], ],
), ),
), ),
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget( child: FFButtonWidget(
key: const ValueKey<String>('SubmitButtonWidget'), key: const ValueKey<String>('SubmitButtonWidget'),
onPressed: _model.isFormInvalid() onPressed: _model.isFormInvalid()
@ -265,22 +248,16 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen>
width: double.infinity, width: double.infinity,
height: 44.0, height: 44.0,
color: FlutterFlowTheme.of(context).accent1, color: FlutterFlowTheme.of(context).accent1,
textStyle: FlutterFlowTheme.of(context) textStyle: FlutterFlowTheme.of(context).titleSmall.override(
.titleSmall fontFamily: 'Plus Jakarta Sans',
.override( color: FlutterFlowTheme.of(context).secondaryText,
fontFamily: 'Plus Jakarta Sans', fontSize: 16.0,
color: fontWeight: FontWeight.w500,
FlutterFlowTheme.of(context).secondaryText, useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans')),
fontSize: 16.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap()
.containsKey('Plus Jakarta Sans')),
elevation: 3.0, elevation: 3.0,
borderSide: const BorderSide( borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
color: Colors.transparent, width: 1.0),
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
disabledColor: disabledColor: FlutterFlowTheme.of(context).customColor5,
FlutterFlowTheme.of(context).customColor5,
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
), ),
showLoadingIndicator: true, showLoadingIndicator: true,
@ -328,28 +305,22 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen>
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: 16.0, fontSize: 16.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
), ),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(color: FlutterFlowTheme.of(context).customColor1, width: 0.25),
color: FlutterFlowTheme.of(context).customColor1,
width: 0.25),
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: borderSide: const BorderSide(color: Color(0xFF1AAB5F), width: 0.25),
const BorderSide(color: Color(0xFF1AAB5F), width: 0.25),
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
), ),
errorBorder: OutlineInputBorder( errorBorder: OutlineInputBorder(
borderSide: borderSide: const BorderSide(color: Color(0xFFFF5963), width: 0.25),
const BorderSide(color: Color(0xFFFF5963), width: 0.25),
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
), ),
focusedErrorBorder: OutlineInputBorder( focusedErrorBorder: OutlineInputBorder(
borderSide: borderSide: const BorderSide(color: Color(0xFFFF5963), width: 0.25),
const BorderSide(color: Color(0xFFFF5963), width: 0.25),
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
), ),
filled: true, filled: true,
@ -359,9 +330,7 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen>
onTap: onVisibilityToggle, onTap: onVisibilityToggle,
focusNode: FocusNode(skipTraversal: true), focusNode: FocusNode(skipTraversal: true),
child: Icon( child: Icon(
visibility visibility ? Icons.visibility_outlined : Icons.visibility_off_outlined,
? Icons.visibility_outlined
: Icons.visibility_off_outlined,
color: FlutterFlowTheme.of(context).accent1, color: FlutterFlowTheme.of(context).accent1,
size: 24.0, size: 24.0,
), ),
@ -372,8 +341,7 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen>
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: 16.0, fontSize: 16.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
), ),
validator: asValidator, validator: asValidator,
), ),

View File

@ -146,50 +146,50 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: build name: build
sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.1" version: "2.4.2"
build_config: build_config:
dependency: transitive dependency: transitive
description: description:
name: build_config name: build_config
sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.1" version: "1.1.2"
build_daemon: build_daemon:
dependency: transitive dependency: transitive
description: description:
name: build_daemon name: build_daemon
sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" sha256: "294a2edaf4814a378725bfe6358210196f5ea37af89ecd81bfa32960113d4948"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.0.2" version: "4.0.3"
build_resolvers: build_resolvers:
dependency: transitive dependency: transitive
description: description:
name: build_resolvers name: build_resolvers
sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" sha256: "99d3980049739a985cf9b21f30881f46db3ebc62c5b8d5e60e27440876b1ba1e"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.2" version: "2.4.3"
build_runner: build_runner:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: build_runner name: build_runner
sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d" sha256: "74691599a5bc750dc96a6b4bfd48f7d9d66453eab04c7f4063134800d6a5c573"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.13" version: "2.4.14"
build_runner_core: build_runner_core:
dependency: transitive dependency: transitive
description: description:
name: build_runner_core name: build_runner_core
sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 sha256: "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "7.3.2" version: "8.0.0"
built_collection: built_collection:
dependency: transitive dependency: transitive
description: description:
@ -824,18 +824,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: glob name: glob
sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.2" version: "2.1.3"
go_router: go_router:
dependency: "direct main" dependency: "direct main"
description: description:
name: go_router name: go_router
sha256: "7c2d40b59890a929824f30d442e810116caf5088482629c894b9e4478c67472d" sha256: daf3ff5570f55396b2d2c9bf8136d7db3a8acf208ac0cef92a3ae2beb9a81550
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "14.6.3" version: "14.7.1"
google_fonts: google_fonts:
dependency: "direct main" dependency: "direct main"
description: description:
@ -896,10 +896,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: http_parser name: http_parser
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.0.2" version: "4.1.2"
image: image:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -952,10 +952,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: image_picker_macos name: image_picker_macos
sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" sha256: "1b90ebbd9dcf98fb6c1d01427e49a55bd96b5d67b8c67cf955d60a5de74207c1"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.2.1+1" version: "0.2.1+2"
image_picker_platform_interface: image_picker_platform_interface:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1061,10 +1061,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: lints name: lints
sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.0.0" version: "5.1.1"
local_auth: local_auth:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1181,10 +1181,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: mockito name: mockito
sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" sha256: f99d8d072e249f719a5531735d146d8cf04c580d93920b04de75bef6dfb2daf6
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.4.4" version: "5.4.5"
nested: nested:
dependency: transitive dependency: transitive
description: description:
@ -1461,10 +1461,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: pubspec_parse name: pubspec_parse
sha256: "81876843eb50dc2e1e5b151792c9a985c5ed2536914115ed04e9c8528f6647b0" sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.4.0" version: "1.5.0"
qr: qr:
dependency: transitive dependency: transitive
description: description:
@ -1533,10 +1533,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: shared_preferences name: shared_preferences
sha256: a752ce92ea7540fc35a0d19722816e04d0e72828a4200e83a98cf1a1eb524c9a sha256: c59819dacc6669a1165d54d2735a9543f136f9b3cec94ca65cea6ab8dffc422e
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.5" version: "2.4.0"
shared_preferences_android: shared_preferences_android:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1589,10 +1589,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: shelf name: shelf
sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.4.1" version: "1.4.2"
shelf_packages_handler: shelf_packages_handler:
dependency: transitive dependency: transitive
description: description:
@ -1874,10 +1874,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_web name: url_launcher_web
sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" sha256: "3ba963161bd0fe395917ba881d320b9c4f6dd3c4a233da62ab18a5025c85f1e9"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.3" version: "2.4.0"
url_launcher_windows: url_launcher_windows:
dependency: transitive dependency: transitive
description: description:
@ -1962,10 +1962,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: web_socket_channel name: web_socket_channel
sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" sha256: "0b8e2457400d8a859b7b2030786835a28a8e80836ef64402abef392ff4f1d0e5"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.1" version: "3.0.2"
webdriver: webdriver:
dependency: transitive dependency: transitive
description: description:
@ -2055,5 +2055,5 @@ packages:
source: hosted source: hosted
version: "3.1.3" version: "3.1.3"
sdks: sdks:
dart: ">=3.5.0 <4.0.0" dart: ">=3.6.0 <4.0.0"
flutter: ">=3.24.0" flutter: ">=3.27.0"

3
scripts/test.ps1 Normal file
View File

@ -0,0 +1,3 @@
flutter clean
flutter pub get
patrol test --target integration_test/app_test.dart --verbose

3
scripts/test.sh Normal file
View File

@ -0,0 +1,3 @@
flutter clean
flutter pub get
patrol test --target integration_test/app_test.dart