Merge branch 'fix/fd-1114' into develop
This commit is contained in:
commit
114e0151cf
|
@ -1,5 +1,5 @@
|
|||
org.gradle.jvmargs=-Xmx4608m
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
android.enableR8=true
|
||||
# android.enableR8=true
|
||||
enableProguardInReleaseBuilds = true
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -2,12 +2,11 @@ part of 'app_test.dart';
|
|||
|
||||
class AuthenticationTest {
|
||||
static Future<void> 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<String, String> concat(
|
||||
String username, String domain, String password) {
|
||||
Map<String, String> 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<String, String> 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<void> 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<String, String> 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<String, String> concat(
|
||||
String name, String username, String domain, String password) {
|
||||
Map<String, String> 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<void> 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<void> 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<void> _auth(
|
||||
Map<String, String> credentials,
|
||||
PatrolTester $,
|
||||
PatrolIntegrationTester $,
|
||||
PatrolFinder throwsException,
|
||||
) async {
|
||||
await _enterCredentials(credentials, $);
|
||||
|
@ -234,7 +220,7 @@ Future<void> _auth(
|
|||
|
||||
Future<void> _enterCredentials(
|
||||
Map<String, String> credentials,
|
||||
PatrolTester $,
|
||||
PatrolIntegrationTester $,
|
||||
) async {
|
||||
for (var entry in credentials.entries) {
|
||||
await $(ValueKey(entry.key)) //
|
||||
|
@ -244,8 +230,7 @@ Future<void> _enterCredentials(
|
|||
}
|
||||
}
|
||||
|
||||
Future<void> _submit(
|
||||
String key, PatrolTester $, PatrolFinder throwsException) async {
|
||||
Future<void> _submit(String key, PatrolIntegrationTester $, PatrolFinder throwsException) async {
|
||||
await $(ValueKey(key)) //
|
||||
.waitUntilVisible()
|
||||
.tap();
|
||||
|
@ -263,6 +248,5 @@ Future<void> _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();
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
);
|
||||
}
|
|
@ -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<String, String> 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<String, String> credentials;
|
||||
final PatrolFinder throwsException = $('');
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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<void> main() async {
|
||||
|
@ -31,7 +31,7 @@ Future<void> 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<void> 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;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
part of 'app_test.dart';
|
||||
|
||||
Future<void> _loggedWithMultiLocalsAccount(
|
||||
Future<void> _loggedWithMultiLocalsAccount(PatrolIntegrationTester $,
|
||||
[bool forceLinkedLocal = true]) async {
|
||||
await initializeApp();
|
||||
await _init($);
|
||||
await StorageHelper() //
|
||||
.set(SecureStorageKey.isLogged.value, 'true');
|
||||
await StorageHelper() //
|
||||
|
@ -29,9 +29,9 @@ Future<void> _loggedWithMultiLocalsAccount(
|
|||
}
|
||||
}
|
||||
|
||||
Future<void> _loggedWithSomeoneLocalAccount(
|
||||
Future<void> _loggedWithSomeoneLocalAccount(PatrolIntegrationTester $,
|
||||
[bool forceLinkedLocal = true]) async {
|
||||
await initializeApp();
|
||||
await _init($);
|
||||
await StorageHelper() //
|
||||
.set(SecureStorageKey.isLogged.value, 'true');
|
||||
await StorageHelper() //
|
||||
|
@ -58,8 +58,8 @@ Future<void> _loggedWithSomeoneLocalAccount(
|
|||
}
|
||||
}
|
||||
|
||||
Future<void> _unlogged() async {
|
||||
await initializeApp();
|
||||
Future<void> _unlogged(PatrolIntegrationTester $) async {
|
||||
await _init($);
|
||||
await StorageHelper() //
|
||||
.set(SecureStorageKey.isLogged.value, 'false');
|
||||
await StorageHelper() //
|
||||
|
@ -78,12 +78,24 @@ Future<void> _unlogged() async {
|
|||
.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();
|
||||
await signInButton.tap();
|
||||
}
|
||||
|
||||
Future<void> _navigateToSignUp(PatrolTester $) async {
|
||||
Future<void> _navigateToSignUp(PatrolIntegrationTester $) async {
|
||||
final signUpButton = $(#toggleSignUpPage).waitUntilVisible();
|
||||
await signUpButton.tap();
|
||||
}
|
||||
|
@ -91,3 +103,61 @@ Future<void> _navigateToSignUp(PatrolTester $) async {
|
|||
Future<void> _navigateBackUsingSystemGesture() async =>
|
||||
IntegrationTestWidgetsFlutterBinding.instance.keyboard
|
||||
.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();
|
||||
}
|
||||
|
|
|
@ -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($);
|
||||
|
|
|
@ -19,12 +19,10 @@ class ForgotPasswordTemplateComponentWidget extends StatefulWidget {
|
|||
const ForgotPasswordTemplateComponentWidget({super.key});
|
||||
|
||||
@override
|
||||
State<ForgotPasswordTemplateComponentWidget> createState() =>
|
||||
_ForgotPasswordTemplateComponentWidgetState();
|
||||
State<ForgotPasswordTemplateComponentWidget> createState() => _ForgotPasswordTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _ForgotPasswordTemplateComponentWidgetState
|
||||
extends State<ForgotPasswordTemplateComponentWidget> {
|
||||
class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTemplateComponentWidget> {
|
||||
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<String>('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,17 +172,14 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getText('mtz8l7ft' /* E-mail */),
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
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'),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
|
@ -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<String>('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(
|
||||
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'),
|
||||
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,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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,
|
||||
|
|
|
@ -260,7 +260,7 @@ Future<void> onMessageReceived(
|
|||
}
|
||||
|
||||
class NotificationService {
|
||||
static Future<void> initialize() async {
|
||||
static Future<void> initialize([bool forceRequest = true]) async {
|
||||
await AwesomeNotifications().initialize(
|
||||
'resource://drawable/notification_icon',
|
||||
[
|
||||
|
@ -296,6 +296,7 @@ class NotificationService {
|
|||
if (isAllowed == false) {
|
||||
await StorageHelper()
|
||||
.set(LocalsStorageKey.requestOSNotification.key, true);
|
||||
if (forceRequest == true)
|
||||
await AwesomeNotifications().requestPermissionToSendNotifications();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,20 +86,11 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
|
|||
builder: (context, _) {
|
||||
return FutureBuilder<Widget>(
|
||||
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<HomeBloc>(
|
||||
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<bool> Function(BuildContext context)? update =
|
||||
params.getParam('update', ParamType.Function);
|
||||
final Future<bool> 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<String, String?> {
|
||||
Map<String, String> 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<String, dynamic> get extraMap =>
|
||||
extra != null ? extra as Map<String, dynamic> : {};
|
||||
Map<String, dynamic> get extraMap => extra != null ? extra as Map<String, dynamic> : {};
|
||||
Map<String, dynamic> get allParams => <String, dynamic>{}
|
||||
..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<String, dynamic> futureParamValues = {};
|
||||
|
||||
bool get isEmpty =>
|
||||
state.allParams.isEmpty ||
|
||||
(state.allParams.length == 1 &&
|
||||
state.extraMap.containsKey(kTransitionInfoKey));
|
||||
bool isAsyncParam(MapEntry<String, dynamic> param) =>
|
||||
asyncParams.containsKey(param.key) && param.value is String;
|
||||
state.allParams.isEmpty || (state.allParams.length == 1 && 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);
|
||||
Future<bool> 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<T>(String paramName, ParamType type,
|
||||
{bool isList = false, StructBuilder<T>? structBuilder}) {
|
||||
if (futureParamValues.containsKey(paramName))
|
||||
return futureParamValues[paramName];
|
||||
dynamic getParam<T>(String paramName, ParamType type, {bool isList = false, StructBuilder<T>? 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<T>(param, type, isList,
|
||||
structBuilder: structBuilder);
|
||||
return deserializeParam<T>(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<RootPageContext?>();
|
||||
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}) =>
|
||||
|
|
|
@ -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<ForgotPasswordScreen> createState() => _ForgotPasswordScreenState();
|
||||
}
|
||||
|
||||
class _ForgotPasswordScreenState extends State<ForgotPasswordScreen>
|
||||
with TickerProviderStateMixin {
|
||||
class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> with TickerProviderStateMixin {
|
||||
late ForgotPasswordScreenModel _model;
|
||||
final animationsMap = <String, AnimationInfo>{};
|
||||
|
||||
|
@ -116,6 +114,7 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen>
|
|||
},
|
||||
),
|
||||
title: Text(
|
||||
key: ValueKey('ForgotPasswordText'),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Recuperar Senha',
|
||||
enText: 'Recover Password',
|
||||
|
@ -149,8 +148,7 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen>
|
|||
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<ForgotPasswordScreen>
|
|||
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<ForgotPasswordScreen>
|
|||
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<ForgotPasswordScreen>
|
|||
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<String>('SubmitButtonWidget'),
|
||||
onPressed: _model.isFormInvalid()
|
||||
|
@ -265,22 +248,16 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen>
|
|||
width: double.infinity,
|
||||
height: 44.0,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
textStyle: FlutterFlowTheme.of(context)
|
||||
.titleSmall
|
||||
.override(
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(context).secondaryText,
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans')),
|
||||
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<ForgotPasswordScreen>
|
|||
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<ForgotPasswordScreen>
|
|||
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<ForgotPasswordScreen>
|
|||
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,
|
||||
),
|
||||
|
|
72
pubspec.lock
72
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"
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
flutter clean
|
||||
flutter pub get
|
||||
patrol test --target integration_test/app_test.dart --verbose
|
|
@ -0,0 +1,3 @@
|
|||
flutter clean
|
||||
flutter pub get
|
||||
patrol test --target integration_test/app_test.dart
|
Loading…
Reference in New Issue