format
This commit is contained in:
parent
937aebaf41
commit
3a3c0d74f4
|
@ -29,6 +29,8 @@ import 'package:integration_test/integration_test.dart';
|
|||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:patrol/patrol.dart';
|
||||
import 'package:flutter_web_plugins/url_strategy.dart';
|
||||
import 'package:patrol_finders/patrol_finders.dart';
|
||||
// import 'package:patrol_finders/patrol_finders.dart';
|
||||
|
||||
import 'app_test.dart';
|
||||
import 'fuzzer/fuzzer.dart';
|
||||
|
@ -50,7 +52,7 @@ part 'storage_test.dart';
|
|||
part 'utils_test.dart';
|
||||
part 'welcome_test.dart';
|
||||
|
||||
late PatrolIntegrationTester $;
|
||||
late PatrolTester $;
|
||||
|
||||
void main() {
|
||||
//init integration test
|
||||
|
|
|
@ -2,11 +2,12 @@ part of 'app_test.dart';
|
|||
|
||||
class AuthenticationTest {
|
||||
static Future<void> signIn() async {
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'Sign-In with fuzzed emails',
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester 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(
|
||||
|
@ -32,7 +33,8 @@ 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,
|
||||
|
@ -57,11 +59,12 @@ class AuthenticationTest {
|
|||
},
|
||||
);
|
||||
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'Sign-In with email_app@exemplo.com',
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester 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 = {
|
||||
|
@ -78,11 +81,12 @@ class AuthenticationTest {
|
|||
}
|
||||
|
||||
static Future<void> signUp() async {
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'Sign Up - credenciais já registradas',
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester 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 = {
|
||||
|
@ -98,11 +102,12 @@ class AuthenticationTest {
|
|||
},
|
||||
);
|
||||
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'Sign Up - credenciais novas',
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole('Authentication Test - Sign-Up: credenciais novas');
|
||||
$.tester
|
||||
.printToConsole('Authentication Test - Sign-Up: credenciais novas');
|
||||
|
||||
final PatrolFinder throwsException = $(Dialog).$(ThrowExceptionWidget);
|
||||
|
||||
|
@ -135,7 +140,8 @@ 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',
|
||||
|
@ -164,11 +170,12 @@ class AuthenticationTest {
|
|||
}
|
||||
|
||||
static Future<void> signOut() async {
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'Deslogar da Conta',
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole('Authentication Test - Sign-Out: Deslogar da Conta');
|
||||
$.tester.printToConsole(
|
||||
'Authentication Test - Sign-Out: Deslogar da Conta');
|
||||
|
||||
await _loggedWithMultiLocalsAccount($);
|
||||
await $.pumpWidget(const App());
|
||||
|
@ -179,7 +186,9 @@ class AuthenticationTest {
|
|||
|
||||
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));
|
||||
},
|
||||
|
@ -203,7 +212,8 @@ class AuthenticationTest {
|
|||
Future.delayed(Duration(seconds: 3));
|
||||
await $.pump(Duration(seconds: 3));
|
||||
await $.pumpAndSettle();
|
||||
final PatrolFinder forgotPassword = await $(#ForgotPasswordScreen).waitUntilVisible();
|
||||
final PatrolFinder forgotPassword =
|
||||
await $(#ForgotPasswordScreen).waitUntilVisible();
|
||||
expect(forgotPassword, findsOneWidget);
|
||||
});
|
||||
}
|
||||
|
@ -211,7 +221,7 @@ class AuthenticationTest {
|
|||
|
||||
Future<void> _auth(
|
||||
Map<String, String> credentials,
|
||||
PatrolIntegrationTester $,
|
||||
PatrolTester $,
|
||||
PatrolFinder throwsException,
|
||||
) async {
|
||||
await _enterCredentials(credentials, $);
|
||||
|
@ -220,7 +230,7 @@ Future<void> _auth(
|
|||
|
||||
Future<void> _enterCredentials(
|
||||
Map<String, String> credentials,
|
||||
PatrolIntegrationTester $,
|
||||
PatrolTester $,
|
||||
) async {
|
||||
for (var entry in credentials.entries) {
|
||||
await $(ValueKey(entry.key)) //
|
||||
|
@ -230,7 +240,8 @@ Future<void> _enterCredentials(
|
|||
}
|
||||
}
|
||||
|
||||
Future<void> _submit(String key, PatrolIntegrationTester $, PatrolFinder throwsException) async {
|
||||
Future<void> _submit(
|
||||
String key, PatrolTester $, PatrolFinder throwsException) async {
|
||||
await $(ValueKey(key)) //
|
||||
.waitUntilVisible()
|
||||
.tap();
|
||||
|
@ -248,5 +259,6 @@ Future<void> _submit(String key, PatrolIntegrationTester $, PatrolFinder throwsE
|
|||
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();
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ final _nativeAutomatorConfig = NativeAutomatorConfig(
|
|||
findTimeout: Duration(seconds: 20), // 10 seconds is too short for some CIs
|
||||
);
|
||||
|
||||
// Future<void> createApp(PatrolIntegrationTester $) async {
|
||||
// Future<void> createApp(PatrolTester $) async {
|
||||
// await app_main.main();
|
||||
// await $.pumpAndSettle();
|
||||
// }
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -46,9 +46,9 @@ class LocalsTest {
|
|||
// }
|
||||
// },
|
||||
// );
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'Selecionar um local disponível com somente um local disponivel', //
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole('Locals Test - Selecionar um local disponível');
|
||||
|
||||
|
@ -184,9 +184,9 @@ class LocalsTest {
|
|||
// // }
|
||||
// },
|
||||
// );
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'Desvincular do local selecionado com somente um local disponivel', //
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole(
|
||||
'Locals Test - Desvincular do local selecionado com multiplos locais disponiveis');
|
||||
|
@ -247,9 +247,9 @@ class LocalsTest {
|
|||
expect(entriesFinder, findsWidgets);
|
||||
});
|
||||
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'Vincular um local desvinculado com somente um local disponivel', //
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole('Locals Test - Vincular um local desvinculado');
|
||||
|
||||
|
@ -302,9 +302,9 @@ class LocalsTest {
|
|||
}
|
||||
|
||||
static Future attachLocal() async {
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'Selecionar um local disponível com multíplos locais disponíveis', //
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
await _loggedWithMultiLocalsAccount($);
|
||||
await $.pumpWidget(const App());
|
||||
|
@ -337,9 +337,9 @@ class LocalsTest {
|
|||
return;
|
||||
},
|
||||
);
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'Selecionar um local disponível com somente um local disponível', //
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
await _loggedWithSomeoneLocalAccount($);
|
||||
await $.pumpWidget(const App());
|
||||
|
|
|
@ -2,10 +2,10 @@ part of 'app_test.dart';
|
|||
|
||||
class MenuTest {
|
||||
static Future labels2AppbarConsistency() async {
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'As labels dos menuItems correspondem aos títulos das AppBars? (MultiLocais)',
|
||||
//
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole(
|
||||
'Menu Test - As labels dos menuItems correspondem aos títulos das AppBars?');
|
||||
|
@ -96,9 +96,9 @@ class MenuTest {
|
|||
}
|
||||
|
||||
static Future containEntries() async {
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'HomeMenu contém seus itens? (MultiLocais)', //
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole('Menu Test - HomeMenu contém seus itens?');
|
||||
|
||||
|
@ -135,9 +135,9 @@ class MenuTest {
|
|||
expect(entriesKey, containsAll(menuKeys));
|
||||
},
|
||||
);
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'HomeMenu contém seus itens? (MonoLocal)', //
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole('Menu Test - HomeMenu contém seus itens?');
|
||||
|
||||
|
@ -175,9 +175,9 @@ class MenuTest {
|
|||
},
|
||||
);
|
||||
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'DrawerMenu contém seus itens? (MultiLocais)', //
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole('Menu Test - DrawerMenu contém seus itens?');
|
||||
|
||||
|
@ -222,9 +222,9 @@ class MenuTest {
|
|||
await Future.delayed(const Duration(milliseconds: 500));
|
||||
},
|
||||
);
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'DrawerMenu contém seus itens? (MonoLocal)', //
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole('Menu Test - DrawerMenu contém seus itens?');
|
||||
|
||||
|
@ -272,9 +272,9 @@ class MenuTest {
|
|||
}
|
||||
|
||||
static Future navToEntries() async {
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'Navegação entre items do Menu (MultiLocais)',
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole('Menu Test - Navegação entre items do Menu');
|
||||
|
||||
|
|
|
@ -2,8 +2,9 @@ part of 'app_test.dart';
|
|||
|
||||
class ModularizationTest {
|
||||
static Future containLicense() async {
|
||||
patrol('Os modulos de licença está sendo processados? (MultiLocais)',
|
||||
(PatrolIntegrationTester tester) async {
|
||||
patrolWidgetTest(
|
||||
'Os modulos de licença está sendo processados? (MultiLocais)',
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole(
|
||||
'Modularization Test - Os modulos de licença está sendo processados?');
|
||||
|
@ -27,8 +28,9 @@ class ModularizationTest {
|
|||
|
||||
return;
|
||||
});
|
||||
patrol('Os modulos de licença está sendo processados? (MonoLocal)',
|
||||
(PatrolIntegrationTester tester) async {
|
||||
patrolWidgetTest(
|
||||
'Os modulos de licença está sendo processados? (MonoLocal)',
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole(
|
||||
'Modularization Test - Os modulos de licença está sendo processados?');
|
||||
|
@ -55,9 +57,9 @@ class ModularizationTest {
|
|||
}
|
||||
|
||||
static Future switchLicense() async {
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'Licença está sendo atualizada?',
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole('Licença está sendo atualizada?');
|
||||
|
||||
|
|
|
@ -59,7 +59,8 @@ Future<void> main() async {
|
|||
// Maybe somewhat counterintuitively, this callback runs *after* the calls
|
||||
// to group() below.
|
||||
final topLevelGroup = Invoker.current!.liveTest.groups.first;
|
||||
final dartTestGroup = createDartTestGroup(topLevelGroup,
|
||||
final dartTestGroup = createDartTestGroup(
|
||||
topLevelGroup,
|
||||
tags: null,
|
||||
excludeTags: null,
|
||||
);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
part of 'app_test.dart';
|
||||
|
||||
Future<void> _loggedWithMultiLocalsAccount(PatrolIntegrationTester $,
|
||||
Future<void> _loggedWithMultiLocalsAccount(PatrolTester $,
|
||||
[bool forceLinkedLocal = true]) async {
|
||||
await _init($);
|
||||
await StorageHelper() //
|
||||
|
@ -29,7 +29,7 @@ Future<void> _loggedWithMultiLocalsAccount(PatrolIntegrationTester $,
|
|||
}
|
||||
}
|
||||
|
||||
Future<void> _loggedWithSomeoneLocalAccount(PatrolIntegrationTester $,
|
||||
Future<void> _loggedWithSomeoneLocalAccount(PatrolTester $,
|
||||
[bool forceLinkedLocal = true]) async {
|
||||
await _init($);
|
||||
await StorageHelper() //
|
||||
|
@ -58,7 +58,7 @@ Future<void> _loggedWithSomeoneLocalAccount(PatrolIntegrationTester $,
|
|||
}
|
||||
}
|
||||
|
||||
Future<void> _unlogged(PatrolIntegrationTester $) async {
|
||||
Future<void> _unlogged(PatrolTester $) async {
|
||||
await _init($);
|
||||
await StorageHelper() //
|
||||
.set(SecureStorageKey.isLogged.value, 'false');
|
||||
|
@ -78,7 +78,7 @@ Future<void> _unlogged(PatrolIntegrationTester $) async {
|
|||
.set(LocalsStorageKey.isNewVersion.key, true);
|
||||
}
|
||||
|
||||
Future<void> _init(PatrolIntegrationTester $) async {
|
||||
Future<void> _init(PatrolTester $) async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await _initializeTracking();
|
||||
await _initializeStorage();
|
||||
|
@ -90,12 +90,12 @@ Future<void> _init(PatrolIntegrationTester $) async {
|
|||
await _initializeNav();
|
||||
}
|
||||
|
||||
Future<void> _navigateToSignIn(PatrolIntegrationTester $) async {
|
||||
Future<void> _navigateToSignIn(PatrolTester $) async {
|
||||
final signInButton = $(#toggleSignInPage).waitUntilVisible();
|
||||
await signInButton.tap();
|
||||
}
|
||||
|
||||
Future<void> _navigateToSignUp(PatrolIntegrationTester $) async {
|
||||
Future<void> _navigateToSignUp(PatrolTester $) async {
|
||||
final signUpButton = $(#toggleSignUpPage).waitUntilVisible();
|
||||
await signUpButton.tap();
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@ part of 'app_test.dart';
|
|||
|
||||
class WelcomeTest {
|
||||
static Future signInToSignUp() async {
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'Sign-In to Sign-Up',
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole('Welcome Test - Sign-In to Sign-Up');
|
||||
await _unlogged($);
|
||||
|
@ -17,9 +17,9 @@ class WelcomeTest {
|
|||
}
|
||||
|
||||
static Future signUpToSignIn() async {
|
||||
patrol(
|
||||
patrolWidgetTest(
|
||||
'Sign-Up to Sign-In',
|
||||
(PatrolIntegrationTester tester) async {
|
||||
(PatrolTester tester) async {
|
||||
$ = tester;
|
||||
$.tester.printToConsole('Welcome Test - Sign-Up to Sign-In');
|
||||
await _unlogged($);
|
||||
|
|
|
@ -19,10 +19,12 @@ 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
|
||||
|
@ -49,9 +51,11 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
|
||||
@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'),
|
||||
|
@ -84,7 +88,8 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
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,
|
||||
|
@ -98,7 +103,8 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
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),
|
||||
|
@ -106,16 +112,20 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
),
|
||||
),
|
||||
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'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -124,30 +134,36 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
),
|
||||
),
|
||||
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'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -155,7 +171,8 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
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(
|
||||
|
@ -172,15 +189,18 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getText('mtz8l7ft' /* E-mail */),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getText('mtz8l7ft' /* E-mail */),
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.black,
|
||||
|
@ -209,7 +229,8 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
),
|
||||
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,
|
||||
|
@ -222,12 +243,14 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
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),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -235,13 +258,17 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
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),
|
||||
|
@ -251,23 +278,28 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
options: FFButtonOptions(
|
||||
width: 270.0,
|
||||
height: 50.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
textStyle:
|
||||
FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||
disabledColor:
|
||||
FlutterFlowTheme.of(context).customColor5,
|
||||
disabledTextColor: Colors.white,
|
||||
),
|
||||
showLoadingIndicator: true,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -66,7 +66,8 @@ class DeepLinkService {
|
|||
),
|
||||
),
|
||||
isScrollControlled: true,
|
||||
backgroundColor: FlutterFlowTheme.of(navigatorKey.currentContext!).primaryBackground,
|
||||
backgroundColor: FlutterFlowTheme.of(navigatorKey.currentContext!)
|
||||
.primaryBackground,
|
||||
showDragHandle: true,
|
||||
useSafeArea: true,
|
||||
enableDrag: true,
|
||||
|
|
|
@ -86,11 +86,20 @@ 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
|
||||
|
@ -100,17 +109,20 @@ 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 {
|
||||
|
@ -134,8 +146,10 @@ 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: ValueKey('ForgotPasswordScreen'),
|
||||
|
@ -152,7 +166,8 @@ 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(
|
||||
|
@ -166,7 +181,8 @@ 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),
|
||||
|
@ -175,12 +191,16 @@ 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',
|
||||
|
@ -192,19 +212,28 @@ 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',
|
||||
|
@ -220,8 +249,11 @@ 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',
|
||||
|
@ -230,13 +262,34 @@ 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',
|
||||
|
@ -252,7 +305,9 @@ 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!)),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -266,7 +321,8 @@ 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)
|
||||
|
@ -279,8 +335,9 @@ 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();
|
||||
}
|
||||
}
|
||||
|
@ -293,13 +350,17 @@ 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;
|
||||
|
@ -309,12 +370,15 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -354,13 +418,16 @@ 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);
|
||||
},
|
||||
|
@ -381,7 +448,8 @@ class TransitionInfo {
|
|||
final Duration duration;
|
||||
final Alignment? alignment;
|
||||
|
||||
static TransitionInfo appDefault() => const TransitionInfo(hasTransition: false);
|
||||
static TransitionInfo appDefault() =>
|
||||
const TransitionInfo(hasTransition: false);
|
||||
}
|
||||
|
||||
class RootPageContext {
|
||||
|
@ -393,7 +461,9 @@ 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,7 +15,8 @@ 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;
|
||||
|
||||
|
@ -23,7 +24,8 @@ 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>{};
|
||||
|
||||
|
@ -148,7 +150,8 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> with Ticker
|
|||
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),
|
||||
|
@ -157,7 +160,8 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> with Ticker
|
|||
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,
|
||||
|
@ -171,21 +175,25 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> with Ticker
|
|||
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),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -201,32 +209,42 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> with Ticker
|
|||
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()
|
||||
|
@ -248,16 +266,22 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> with Ticker
|
|||
width: double.infinity,
|
||||
height: 44.0,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans')),
|
||||
textStyle: FlutterFlowTheme.of(context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(context).secondaryText,
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans')),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent, width: 1.0),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||
disabledColor:
|
||||
FlutterFlowTheme.of(context).customColor5,
|
||||
disabledTextColor: Colors.white,
|
||||
),
|
||||
showLoadingIndicator: true,
|
||||
|
@ -305,22 +329,28 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> with Ticker
|
|||
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,
|
||||
|
@ -330,7 +360,9 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> with Ticker
|
|||
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,
|
||||
),
|
||||
|
@ -341,7 +373,8 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> with Ticker
|
|||
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,
|
||||
),
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
|
Loading…
Reference in New Issue