From 84f04dc069632faab4cd5d8eb635eba4ff36f542 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Wed, 29 Jan 2025 15:38:33 -0300 Subject: [PATCH] format --- integration_test/auth_test.dart | 31 +- integration_test/common.dart | 3 +- integration_test/example_test.dart | 1 + integration_test/locals_test.dart | 45 +- integration_test/menu_test.dart | 70 +- integration_test/module_test.dart | 25 +- integration_test/test_bundle.dart | 3 +- integration_test/utils_test.dart | 9 +- ...ot_password_template_component_widget.dart | 118 ++- .../sign_in_template_component_widget.dart | 839 +++++++++++++----- .../home/presentation/pages/about_system.dart | 9 +- .../notification/deep_link_service.dart | 3 +- lib/firebase_options.dart | 9 +- lib/flutter_flow/nav/nav.dart | 150 +++- lib/initialization.dart | 3 +- .../forgot_password_screen.dart | 111 ++- lib/shared/constants/index.dart | 1 + 17 files changed, 1002 insertions(+), 428 deletions(-) diff --git a/integration_test/auth_test.dart b/integration_test/auth_test.dart index 241e84f5..7dc87264 100644 --- a/integration_test/auth_test.dart +++ b/integration_test/auth_test.dart @@ -6,7 +6,8 @@ class AuthenticationTest { 'Sign-In with fuzzed emails', (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 concat(String username, String domain, String password) { + Map concat( + String username, String domain, String password) { return { 'emailTextFormField': '${username}@${domain}.test', 'passwordTextFormField': password, @@ -61,7 +63,8 @@ class AuthenticationTest { 'Sign-In with email_app@exemplo.com', (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 credentials = { @@ -82,7 +85,8 @@ class AuthenticationTest { 'Sign Up - credenciais já registradas', (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 credentials = { @@ -102,7 +106,8 @@ class AuthenticationTest { 'Sign Up - credenciais novas', (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 concat(String name, String username, String domain, String password) { + Map concat( + String name, String username, String domain, String password) { return { 'nameTextFormField': name, 'emailTextFormField': '${username}@${domain}.test', @@ -168,7 +174,8 @@ class AuthenticationTest { 'Deslogar da Conta', (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)); }, @@ -230,7 +239,8 @@ Future _enterCredentials( } } -Future _submit(String key, PatrolTester $, PatrolFinder throwsException) async { +Future _submit( + String key, PatrolTester $, PatrolFinder throwsException) async { await $(ValueKey(key)) // .waitUntilVisible() .tap(); @@ -248,5 +258,6 @@ Future _submit(String key, PatrolTester $, PatrolFinder throwsException) a String _generateRandomString(int length) { const chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; final rand = Random(); - return List.generate(length, (index) => chars[rand.nextInt(chars.length)]).join(); + return List.generate(length, (index) => chars[rand.nextInt(chars.length)]) + .join(); } diff --git a/integration_test/common.dart b/integration_test/common.dart index 295d56bc..87825994 100644 --- a/integration_test/common.dart +++ b/integration_test/common.dart @@ -16,7 +16,8 @@ void patrol( bool? skip, List tags = const [], NativeAutomatorConfig? nativeAutomatorConfig, - LiveTestWidgetsFlutterBindingFramePolicy framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fadePointers, + LiveTestWidgetsFlutterBindingFramePolicy framePolicy = + LiveTestWidgetsFlutterBindingFramePolicy.fadePointers, }) { patrolTest( description, diff --git a/integration_test/example_test.dart b/integration_test/example_test.dart index e69de29b..8b137891 100644 --- a/integration_test/example_test.dart +++ b/integration_test/example_test.dart @@ -0,0 +1 @@ + diff --git a/integration_test/locals_test.dart b/integration_test/locals_test.dart index a7337e20..1fe1a6cb 100644 --- a/integration_test/locals_test.dart +++ b/integration_test/locals_test.dart @@ -57,7 +57,8 @@ class LocalsTest { await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(LocalProfileComponentWidget)); - final PatrolFinder profileFinder = $(#AsyncLocalProfileComponentWidget_InkWell); + final PatrolFinder profileFinder = + $(#AsyncLocalProfileComponentWidget_InkWell); expect(profileFinder, findsOneWidget); await $(profileFinder) // @@ -183,10 +184,12 @@ class LocalsTest { // // } // }, // ); - patrolWidgetTest('Desvincular do local selecionado com somente um local disponivel', // + patrolWidgetTest( + 'Desvincular do local selecionado com somente um local disponivel', // (PatrolTester tester) async { $ = tester; - $.tester.printToConsole('Locals Test - Desvincular do local selecionado com multiplos locais disponiveis'); + $.tester.printToConsole( + 'Locals Test - Desvincular do local selecionado com multiplos locais disponiveis'); await _loggedWithSomeoneLocalAccount($); await $.pumpWidgetAndSettle(const App()); @@ -225,8 +228,9 @@ class LocalsTest { await $.pump(const Duration(seconds: 1)); await $.pump(); - final PatrolFinder bottomSheetFinder = await $(BottomArrowLinkedLocalsComponentWidget) // - .waitUntilVisible(); + final PatrolFinder bottomSheetFinder = + await $(BottomArrowLinkedLocalsComponentWidget) // + .waitUntilVisible(); expect(bottomSheetFinder, findsOneWidget); @@ -236,7 +240,9 @@ class LocalsTest { expect(listViewFinder, findsOneWidget); - final PatrolFinder entriesFinder = await $(listViewFinder).$(CardItemTemplateComponentWidget).waitUntilVisible(); + final PatrolFinder entriesFinder = await $(listViewFinder) + .$(CardItemTemplateComponentWidget) + .waitUntilVisible(); expect(entriesFinder, findsWidgets); }); @@ -250,8 +256,9 @@ class LocalsTest { await _loggedWithSomeoneLocalAccount($, false); await $.pumpWidget(const App()); - final PatrolFinder bottomSheetFinder = await $(BottomArrowLinkedLocalsComponentWidget) // - .waitUntilVisible(); + final PatrolFinder bottomSheetFinder = + await $(BottomArrowLinkedLocalsComponentWidget) // + .waitUntilVisible(); expect(bottomSheetFinder, findsOneWidget); await $.pump(const Duration(milliseconds: 500)); @@ -307,12 +314,19 @@ class LocalsTest { var name = ff.randomString(7, 7, true, true, true); var email = '$name@example.com'; var password = '12345678'; - credentials = {'nameTextFormField': name, 'emailTextFormField': email, 'passwordTextFormField': password}; + credentials = { + 'nameTextFormField': name, + 'emailTextFormField': email, + 'passwordTextFormField': password + }; await $.pumpWidget(const App()); await _navigateToSignUp($); await _auth(credentials, $, throwsException); - credentials = {'emailTextFormField': email, 'passwordTextFormField': password}; + credentials = { + 'emailTextFormField': email, + 'passwordTextFormField': password + }; await _auth(credentials, $, throwsException); await $.pumpAndSettle(); @@ -335,12 +349,19 @@ class LocalsTest { var name = ff.randomString(7, 7, true, true, true); var email = '$name@example.com'; var password = '12345678'; - credentials = {'nameTextFormField': name, 'emailTextFormField': email, 'passwordTextFormField': password}; + credentials = { + 'nameTextFormField': name, + 'emailTextFormField': email, + 'passwordTextFormField': password + }; await $.pumpWidget(const App()); await _navigateToSignUp($); await _auth(credentials, $, throwsException); - credentials = {'emailTextFormField': email, 'passwordTextFormField': password}; + credentials = { + 'emailTextFormField': email, + 'passwordTextFormField': password + }; await _auth(credentials, $, throwsException); await $.pumpAndSettle(); diff --git a/integration_test/menu_test.dart b/integration_test/menu_test.dart index 28c3c125..092ca63c 100644 --- a/integration_test/menu_test.dart +++ b/integration_test/menu_test.dart @@ -7,7 +7,8 @@ class MenuTest { // (PatrolTester tester) async { $ = tester; - $.tester.printToConsole('Menu Test - As labels dos menuItems correspondem aos títulos das AppBars?'); + $.tester.printToConsole( + 'Menu Test - As labels dos menuItems correspondem aos títulos das AppBars?'); await _loggedWithMultiLocalsAccount($); await $.pumpWidgetAndSettle(const App()); @@ -15,15 +16,18 @@ class MenuTest { await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(LocalProfileComponentWidget)); - final PatrolFinder profileFinder = await $(#AsyncLocalProfileComponentWidget_InkWell).waitUntilVisible(); + final PatrolFinder profileFinder = + await $(#AsyncLocalProfileComponentWidget_InkWell) + .waitUntilVisible(); expect(profileFinder, findsOneWidget); await $(profileFinder) // .waitUntilVisible() .tap(); - final PatrolFinder bottomSheetFinder = await $(BottomArrowLinkedLocalsComponentWidget) // - .waitUntilVisible(); + final PatrolFinder bottomSheetFinder = + await $(BottomArrowLinkedLocalsComponentWidget) // + .waitUntilVisible(); expect(bottomSheetFinder, findsOneWidget); final PatrolFinder listViewFinder = await $(bottomSheetFinder) // @@ -45,10 +49,14 @@ class MenuTest { await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(LocalProfileComponentWidget)); - final List routes = - MenuEntry.entries.where((entry) => entry.key != 'FRE-HUB-LOGOUT').map((entry) => entry.route).toList(); - final List titles = - MenuEntry.entries.where((entry) => entry.key != 'FRE-HUB-LOGOUT').map((entry) => entry.name).toList(); + final List routes = MenuEntry.entries + .where((entry) => entry.key != 'FRE-HUB-LOGOUT') + .map((entry) => entry.route) + .toList(); + final List titles = MenuEntry.entries + .where((entry) => entry.key != 'FRE-HUB-LOGOUT') + .map((entry) => entry.name) + .toList(); final LinkedHashMap routesTitles = LinkedHashMap // .fromIterables(routes, titles); @@ -119,8 +127,10 @@ class MenuTest { await $.pumpAndSettle(); final List entries = MenuEntry.entries; await $.pumpAndSettle(); - final List entriesKey = - entries.where((entry) => entry.types.contains(MenuEntryType.Home)).map((entry) => entry.key).toList(); + final List entriesKey = entries + .where((entry) => entry.types.contains(MenuEntryType.Home)) + .map((entry) => entry.key) + .toList(); await $.pumpAndSettle(); expect(entriesKey, containsAll(menuKeys)); }, @@ -156,8 +166,10 @@ class MenuTest { await $.pumpAndSettle(); final List entries = MenuEntry.entries; await $.pumpAndSettle(); - final List entriesKey = - entries.where((entry) => entry.types.contains(MenuEntryType.Home)).map((entry) => entry.key).toList(); + final List entriesKey = entries + .where((entry) => entry.types.contains(MenuEntryType.Home)) + .map((entry) => entry.key) + .toList(); await $.pumpAndSettle(); expect(entriesKey, containsAll(menuKeys)); }, @@ -201,8 +213,10 @@ class MenuTest { await $.pumpAndSettle(); final List entries = MenuEntry.entries; await $.pumpAndSettle(); - final List entriesKey = - entries.where((entry) => entry.types.contains(MenuEntryType.Drawer)).map((entry) => entry.key).toList(); + final List entriesKey = entries + .where((entry) => entry.types.contains(MenuEntryType.Drawer)) + .map((entry) => entry.key) + .toList(); await $.pumpAndSettle(); expect(entriesKey, containsAll(menuKeys)); await Future.delayed(const Duration(milliseconds: 500)); @@ -246,8 +260,10 @@ class MenuTest { await $.pumpAndSettle(); final List entries = MenuEntry.entries; await $.pumpAndSettle(); - final List entriesKey = - entries.where((entry) => entry.types.contains(MenuEntryType.Drawer)).map((entry) => entry.key).toList(); + final List entriesKey = entries + .where((entry) => entry.types.contains(MenuEntryType.Drawer)) + .map((entry) => entry.key) + .toList(); await $.pumpAndSettle(); expect(entriesKey, containsAll(menuKeys)); await Future.delayed(const Duration(milliseconds: 500)); @@ -266,12 +282,17 @@ class MenuTest { await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); - final PatrolFinder profile = $(const Key('AsyncLocalProfileComponentWidget_InkWell')); - await $(profile).waitUntilVisible().tap(settlePolicy: SettlePolicy.noSettle); + final PatrolFinder profile = + $(const Key('AsyncLocalProfileComponentWidget_InkWell')); + await $(profile) + .waitUntilVisible() + .tap(settlePolicy: SettlePolicy.noSettle); await $.waitUntilVisible($(BottomArrowLinkedLocalsComponentWidget)); final PatrolFinder local = $('FRE ACCESS DEMO'); - await $(local).waitUntilVisible().tap(settlePolicy: SettlePolicy.noSettle); + await $(local) + .waitUntilVisible() + .tap(settlePolicy: SettlePolicy.noSettle); await $.waitUntilVisible($(MenuStaggeredView)); @@ -300,7 +321,8 @@ class MenuTest { timeout: Duration(seconds: 1), ); - final ButtonMenuItem entry = $.tester.widget(gridEntries.at(i)); + final ButtonMenuItem entry = + $.tester.widget(gridEntries.at(i)); final Key? widgetKey = entry.key; expect(widgetKey, isNotNull); @@ -310,14 +332,18 @@ class MenuTest { if (widgetKey == ValueKey('FRE-HUB-RESERVATIONS')) continue; if (widgetKey == ValueKey('FRE-HUB-SETTINGS')) continue; - await $(gridEntries.at(i)).waitUntilVisible(timeout: const Duration(seconds: 1)).tap( + await $(gridEntries.at(i)) + .waitUntilVisible(timeout: const Duration(seconds: 1)) + .tap( settleTimeout: const Duration(seconds: 1), settlePolicy: SettlePolicy.noSettle, ); await $.pumpAndSettle(duration: Duration(milliseconds: 500)); - await $(Icons.keyboard_arrow_left).waitUntilVisible(timeout: const Duration(seconds: 1)).tap( + await $(Icons.keyboard_arrow_left) + .waitUntilVisible(timeout: const Duration(seconds: 1)) + .tap( settleTimeout: const Duration(seconds: 1), settlePolicy: SettlePolicy.noSettle, ); diff --git a/integration_test/module_test.dart b/integration_test/module_test.dart index 10556084..3138f8e0 100644 --- a/integration_test/module_test.dart +++ b/integration_test/module_test.dart @@ -2,9 +2,12 @@ part of 'app_test.dart'; class ModularizationTest { static Future containLicense() async { - patrolWidgetTest('Os modulos de licença está sendo processados? (MultiLocais)', (PatrolTester 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?'); + $.tester.printToConsole( + 'Modularization Test - Os modulos de licença está sendo processados?'); await _loggedWithMultiLocalsAccount($); await $.pumpWidgetAndSettle(const App()); @@ -25,9 +28,12 @@ class ModularizationTest { return; }); - patrolWidgetTest('Os modulos de licença está sendo processados? (MonoLocal)', (PatrolTester 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?'); + $.tester.printToConsole( + 'Modularization Test - Os modulos de licença está sendo processados?'); await _loggedWithSomeoneLocalAccount($); await $.pumpWidgetAndSettle(const App()); @@ -62,12 +68,17 @@ class ModularizationTest { await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); - final PatrolFinder profile = $(const Key('AsyncLocalProfileComponentWidget_InkWell')); - await $(profile).waitUntilVisible().tap(settlePolicy: SettlePolicy.noSettle); + final PatrolFinder profile = + $(const Key('AsyncLocalProfileComponentWidget_InkWell')); + await $(profile) + .waitUntilVisible() + .tap(settlePolicy: SettlePolicy.noSettle); await $.waitUntilVisible($(BottomArrowLinkedLocalsComponentWidget)); final PatrolFinder local = $('FRE ACCESS DEMO'); - await $(local).waitUntilVisible().tap(settlePolicy: SettlePolicy.trySettle); + await $(local) + .waitUntilVisible() + .tap(settlePolicy: SettlePolicy.trySettle); }, ); } diff --git a/integration_test/test_bundle.dart b/integration_test/test_bundle.dart index 52ae7570..55d38e30 100644 --- a/integration_test/test_bundle.dart +++ b/integration_test/test_bundle.dart @@ -59,7 +59,8 @@ Future 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, ); diff --git a/integration_test/utils_test.dart b/integration_test/utils_test.dart index c60cf29d..77eeb957 100644 --- a/integration_test/utils_test.dart +++ b/integration_test/utils_test.dart @@ -1,6 +1,7 @@ part of 'app_test.dart'; -Future _loggedWithMultiLocalsAccount(PatrolTester $, [bool forceLinkedLocal = true]) async { +Future _loggedWithMultiLocalsAccount(PatrolTester $, + [bool forceLinkedLocal = true]) async { await _init($); await StorageHelper() // .set(SecureStorageKey.isLogged.value, 'true'); @@ -28,7 +29,8 @@ Future _loggedWithMultiLocalsAccount(PatrolTester $, [bool forceLinkedLoca } } -Future _loggedWithSomeoneLocalAccount(PatrolTester $, [bool forceLinkedLocal = true]) async { +Future _loggedWithSomeoneLocalAccount(PatrolTester $, + [bool forceLinkedLocal = true]) async { await _init($); await StorageHelper() // .set(SecureStorageKey.isLogged.value, 'true'); @@ -99,7 +101,8 @@ Future _navigateToSignUp(PatrolTester $) async { } Future _navigateBackUsingSystemGesture() async => - IntegrationTestWidgetsFlutterBinding.instance.keyboard.isLogicalKeyPressed(LogicalKeyboardKey.escape); + IntegrationTestWidgetsFlutterBinding.instance.keyboard + .isLogicalKeyPressed(LogicalKeyboardKey.escape); Future _initializeTracking() async { print('Requesting tracking authorization...'); diff --git a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart index 62e99c23..12bdc25e 100644 --- a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart +++ b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart @@ -19,10 +19,12 @@ class ForgotPasswordTemplateComponentWidget extends StatefulWidget { const ForgotPasswordTemplateComponentWidget({super.key}); @override - State createState() => _ForgotPasswordTemplateComponentWidgetState(); + State createState() => + _ForgotPasswordTemplateComponentWidgetState(); } -class _ForgotPasswordTemplateComponentWidgetState extends State { +class _ForgotPasswordTemplateComponentWidgetState + extends State { late ForgotPasswordTemplateComponentModel _model; @override @@ -49,9 +51,11 @@ class _ForgotPasswordTemplateComponentWidgetState extends State('BackButton'), splashColor: Colors.transparent, @@ -98,7 +103,8 @@ class _ForgotPasswordTemplateComponentWidgetState extends State('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 createState() => _SignInTemplateComponentWidgetState(); + State createState() => + _SignInTemplateComponentWidgetState(); } -class _SignInTemplateComponentWidgetState extends State with TickerProviderStateMixin { +class _SignInTemplateComponentWidgetState + extends State with TickerProviderStateMixin { late SignInTemplateComponentModel _model; final animationsMap = {}; @@ -99,14 +101,17 @@ class _SignInTemplateComponentWidgetState extends State('emailTextFormField'), - controller: _model.emailAddressTextController, - focusNode: _model.emailAddressFocusNode, - cursorColor: FlutterFlowTheme.of(context).primary, - onChanged: (_) => EasyDebounce.debounce( + key: const ValueKey( + 'emailTextFormField'), + controller: _model + .emailAddressTextController, + focusNode: _model + .emailAddressFocusNode, + cursorColor: + FlutterFlowTheme.of(context) + .primary, + onChanged: (_) => + EasyDebounce.debounce( '_model.emailAddressTextController', - const Duration(milliseconds: 500), + const Duration( + milliseconds: 500), () => setState(() {}), ), autofocus: true, - autofillHints: const [AutofillHints.email], - textCapitalization: TextCapitalization.none, - textInputAction: TextInputAction.next, + autofillHints: const [ + AutofillHints.email + ], + textCapitalization: + TextCapitalization.none, + textInputAction: + TextInputAction.next, obscureText: false, decoration: InputDecoration( isDense: true, - labelText: FFLocalizations.of(context).getText( + labelText: FFLocalizations.of( + context) + .getText( '1ltg0ylb' /* Email */, ), - labelStyle: FlutterFlowTheme.of(context).labelLarge.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, + labelStyle: FlutterFlowTheme + .of(context) + .labelLarge + .override( + fontFamily: + 'Plus Jakarta Sans', + color: + FlutterFlowTheme.of( + context) + .primaryText, + fontSize: + limitedInputFontSize, letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: - GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + fontWeight: + FontWeight.w500, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), - enabledBorder: OutlineInputBorder( + enabledBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).customColor1, + color: + FlutterFlowTheme.of( + context) + .customColor1, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), - focusedBorder: OutlineInputBorder( + focusedBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).success, + color: + FlutterFlowTheme.of( + context) + .success, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), - errorBorder: OutlineInputBorder( + errorBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of( + context) + .error, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), errorStyle: TextStyle( - color: FlutterFlowTheme.of(context).error, - fontSize: limitedInputFontSize, + color: FlutterFlowTheme.of( + context) + .error, + fontSize: + limitedInputFontSize, fontWeight: FontWeight.w500, ), - focusedErrorBorder: OutlineInputBorder( + focusedErrorBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, + color: + FlutterFlowTheme.of( + context) + .error, width: 0.25, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius.circular( + 12.0), ), suffixIcon: Icon( Icons.email, - color: FlutterFlowTheme.of(context).accent1, + color: FlutterFlowTheme.of( + context) + .accent1, size: 22.0, ), ), - style: FlutterFlowTheme.of(context).bodyLarge.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: - GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), - ), - keyboardType: TextInputType.emailAddress, - validator: - _model.emailAddressTextControllerValidator.asValidator(context), + style: + FlutterFlowTheme.of(context) + .bodyLarge + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme + .of(context) + .primaryText, + fontSize: + limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: + FontWeight.w500, + useGoogleFonts: + GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), + ), + keyboardType: + TextInputType.emailAddress, + validator: _model + .emailAddressTextControllerValidator + .asValidator(context), ), ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), + padding: const EdgeInsetsDirectional + .fromSTEB(0.0, 0.0, 0.0, 16.0), child: SizedBox( width: double.infinity, child: TextFormField( - key: const ValueKey('passwordTextFormField'), - controller: _model.passwordTextController, - cursorColor: FlutterFlowTheme.of(context).primary, - focusNode: _model.passwordFocusNode, - onChanged: (_) => EasyDebounce.debounce('_model.passwordTextController', - const Duration(milliseconds: 500), () => setState(() {})), + key: const ValueKey( + 'passwordTextFormField'), + controller: _model + .passwordTextController, + cursorColor: + FlutterFlowTheme.of(context) + .primary, + focusNode: + _model.passwordFocusNode, + onChanged: (_) => + EasyDebounce.debounce( + '_model.passwordTextController', + const Duration( + milliseconds: 500), + () => setState(() {})), autofocus: true, - autofillHints: const [AutofillHints.password], - textInputAction: TextInputAction.send, - obscureText: !_model.passwordVisibility, + autofillHints: const [ + AutofillHints.password + ], + textInputAction: + TextInputAction.send, + obscureText: + !_model.passwordVisibility, decoration: InputDecoration( isDense: true, - labelText: - FFLocalizations.of(context).getText('2x19ce8k' /* Senha */), - labelStyle: FlutterFlowTheme.of(context).labelLarge.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: - GoogleFonts.asMap().containsKey('Plus Jakarta Sans')), - enabledBorder: OutlineInputBorder( + labelText: FFLocalizations.of( + context) + .getText( + '2x19ce8k' /* Senha */), + labelStyle: FlutterFlowTheme + .of(context) + .labelLarge + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme + .of(context) + .primaryText, + fontSize: + limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: + FontWeight.w500, + useGoogleFonts: + GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans')), + enabledBorder: + OutlineInputBorder( borderSide: BorderSide( - color: FlutterFlowTheme.of(context).customColor1, width: 0.25), - borderRadius: BorderRadius.circular(12.0), + color: + FlutterFlowTheme.of( + context) + .customColor1, + width: 0.25), + borderRadius: + BorderRadius.circular( + 12.0), ), errorStyle: TextStyle( - color: FlutterFlowTheme.of(context).error, - fontSize: limitedInputFontSize, + color: FlutterFlowTheme.of( + context) + .error, + fontSize: + limitedInputFontSize, fontWeight: FontWeight.w500, ), focusedBorder: OutlineInputBorder( borderSide: - const BorderSide(color: Color(0xFF1AAB5F), width: 0.25), - borderRadius: BorderRadius.circular(12.0)), - errorBorder: OutlineInputBorder( - borderSide: const BorderSide(color: Color(0xFFFF5963), width: 0.25), - borderRadius: BorderRadius.circular(12.0), + const BorderSide( + color: Color( + 0xFF1AAB5F), + width: 0.25), + borderRadius: + BorderRadius.circular( + 12.0)), + errorBorder: + OutlineInputBorder( + borderSide: + const BorderSide( + color: Color( + 0xFFFF5963), + width: 0.25), + borderRadius: + BorderRadius.circular( + 12.0), ), - focusedErrorBorder: OutlineInputBorder( - borderSide: const BorderSide(color: Color(0xFFFF5963), width: 0.25), - borderRadius: BorderRadius.circular(12.0), + focusedErrorBorder: + OutlineInputBorder( + borderSide: + const BorderSide( + color: Color( + 0xFFFF5963), + width: 0.25), + borderRadius: + BorderRadius.circular( + 12.0), ), filled: true, - fillColor: FlutterFlowTheme.of(context).primaryBackground, + fillColor: + FlutterFlowTheme.of( + context) + .primaryBackground, suffixIcon: InkWell( - onTap: () => setState( - () => _model.passwordVisibility = !_model.passwordVisibility), - focusNode: FocusNode(skipTraversal: true), + onTap: () => setState(() => + _model.passwordVisibility = + !_model + .passwordVisibility), + focusNode: FocusNode( + skipTraversal: true), child: Icon( _model.passwordVisibility - ? Icons.visibility_outlined - : Icons.visibility_off_outlined, - color: FlutterFlowTheme.of(context).accent1, + ? Icons + .visibility_outlined + : Icons + .visibility_off_outlined, + color: + FlutterFlowTheme.of( + context) + .accent1, size: 24.0), ), ), - style: FlutterFlowTheme.of(context).bodyLarge.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: - GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), - ), - validator: _model.passwordTextControllerValidator.asValidator(context), + style: + FlutterFlowTheme.of(context) + .bodyLarge + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme + .of(context) + .primaryText, + fontSize: + limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: + FontWeight.w500, + useGoogleFonts: + GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), + ), + validator: _model + .passwordTextControllerValidator + .asValidator(context), ), ), ), @@ -353,77 +512,153 @@ class _SignInTemplateComponentWidgetState extends State('SubmitButtonWidget'), + key: const ValueKey( + 'SubmitButtonWidget'), onPressed: _isFormInvalid() ? null : () async { - await AuthenticationService.signIn( + await AuthenticationService + .signIn( context, _model, - emailAdress: _model.emailAddressTextController.text, - password: _model.passwordTextController.text, + emailAdress: _model + .emailAddressTextController + .text, + password: _model + .passwordTextController + .text, ); setState(() {}); }, - text: FFLocalizations.of(context).getText('k44tm7wo' /* Entrar */), + text: FFLocalizations.of( + context) + .getText( + 'k44tm7wo' /* Entrar */), options: FFButtonOptions( width: double.infinity, height: 44.0, - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), + padding: + const EdgeInsetsDirectional + .fromSTEB( + 0.0, 0.0, 0.0, 0.0), iconPadding: - const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of(context).primary, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).info, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: - GoogleFonts.asMap().containsKey('Plus Jakarta Sans')), + const EdgeInsetsDirectional + .fromSTEB( + 0.0, 0.0, 0.0, 0.0), + color: FlutterFlowTheme.of( + context) + .primary, + textStyle: FlutterFlowTheme + .of(context) + .titleSmall + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme + .of(context) + .info, + fontSize: + limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: + FontWeight.w500, + useGoogleFonts: + GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans')), elevation: 3.0, - borderSide: const BorderSide(color: Colors.transparent, width: 1.0), - borderRadius: BorderRadius.circular(12.0), - disabledColor: FlutterFlowTheme.of(context).customColor5, - disabledTextColor: Colors.white, + borderSide: + const BorderSide( + color: Colors + .transparent, + width: 1.0), + borderRadius: + BorderRadius.circular( + 12.0), + disabledColor: + FlutterFlowTheme.of( + context) + .customColor5, + disabledTextColor: + Colors.white, ), showLoadingIndicator: false, ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), + padding: + const EdgeInsetsDirectional + .fromSTEB( + 0.0, 0.0, 0.0, 16.0), child: FFButtonWidget( - key: const ValueKey('toggleSignUpPage'), - onPressed: () async => await widget.toggleSignUpPage?.call(), - text: FFLocalizations.of(context).getText( + key: const ValueKey( + 'toggleSignUpPage'), + onPressed: () async => + await widget + .toggleSignUpPage + ?.call(), + text: FFLocalizations.of( + context) + .getText( '14u7ipws' /* Cadastrar */, ), options: FFButtonOptions( width: double.infinity, height: 44.0, - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), + padding: + const EdgeInsetsDirectional + .fromSTEB( + 0.0, 0.0, 0.0, 0.0), iconPadding: - const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of(context).customColor1, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).secondaryText, - fontSize: limitedInputFontSize, + const EdgeInsetsDirectional + .fromSTEB( + 0.0, 0.0, 0.0, 0.0), + color: FlutterFlowTheme.of( + context) + .customColor1, + textStyle: FlutterFlowTheme + .of(context) + .titleSmall + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme + .of(context) + .secondaryText, + fontSize: + limitedInputFontSize, letterSpacing: 0.0, - fontWeight: FontWeight.w500, + fontWeight: + FontWeight.w500, useGoogleFonts: - GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), ), elevation: 3.0, - borderSide: const BorderSide(color: Colors.transparent, width: 1.0), - borderRadius: BorderRadius.circular(12.0), + borderSide: + const BorderSide( + color: Colors + .transparent, + width: 1.0), + borderRadius: + BorderRadius.circular( + 12.0), ), showLoadingIndicator: false, ), @@ -433,158 +668,279 @@ class _SignInTemplateComponentWidgetState extends State('SubmitButtonWidget'), - onPressed: _isFormInvalid() - ? null - : () async { - try { - await AuthenticationService.signIn( - context, - _model, - emailAdress: _model.emailAddressTextController.text, - password: _model.passwordTextController.text, - ); - setState(() {}); - } catch (e, s) { - await DialogUtil.errorDefault(context); - LogUtil.requestAPIFailed( - 'login.php', - _model.emailAddressTextController.text, - "Login", - e, - s); - } - }, - text: FFLocalizations.of(context).getText('1x926nsn'), + key: const ValueKey< + String>( + 'SubmitButtonWidget'), + onPressed: + _isFormInvalid() + ? null + : () async { + try { + await AuthenticationService + .signIn( + context, + _model, + emailAdress: _model + .emailAddressTextController + .text, + password: _model + .passwordTextController + .text, + ); + setState( + () {}); + } catch (e, s) { + await DialogUtil + .errorDefault( + context); + LogUtil.requestAPIFailed( + 'login.php', + _model + .emailAddressTextController + .text, + "Login", + e, + s); + } + }, + text: FFLocalizations.of( + context) + .getText('1x926nsn'), options: FFButtonOptions( width: double.infinity, height: 44.0, padding: - const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), + const EdgeInsetsDirectional + .fromSTEB(0.0, + 0.0, 0.0, 0.0), iconPadding: - const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of(context).accent1, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).info, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: - GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), - ), + const EdgeInsetsDirectional + .fromSTEB(0.0, + 0.0, 0.0, 0.0), + color: + FlutterFlowTheme.of( + context) + .accent1, + textStyle: + FlutterFlowTheme.of( + context) + .titleSmall + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme.of( + context) + .info, + fontSize: + limitedInputFontSize, + letterSpacing: + 0.0, + fontWeight: + FontWeight + .w500, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), + ), elevation: 3.0, - borderSide: const BorderSide( - color: Colors.transparent, + borderSide: + const BorderSide( + color: Colors + .transparent, width: 1.0, ), - borderRadius: BorderRadius.circular(12.0), - disabledColor: const Color(0xE81AAB5F), + borderRadius: + BorderRadius + .circular(12.0), + disabledColor: + const Color( + 0xE81AAB5F), ), - showLoadingIndicator: true, + showLoadingIndicator: + true, ), ), ), Expanded( child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), + padding: + const EdgeInsetsDirectional + .fromSTEB(0.0, 0.0, + 0.0, 16.0), child: FFButtonWidget( - key: const ValueKey('toggleSignUpPage'), - onPressed: () async => await widget.toggleSignUpPage?.call(), - text: FFLocalizations.of(context) - .getText('jwvd4ai1' /* Cadastrar */), + key: const ValueKey< + String>( + 'toggleSignUpPage'), + onPressed: () async => + await widget + .toggleSignUpPage + ?.call(), + text: FFLocalizations.of( + context) + .getText( + 'jwvd4ai1' /* Cadastrar */), options: FFButtonOptions( width: double.infinity, height: 44.0, padding: - const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), + const EdgeInsetsDirectional + .fromSTEB(0.0, + 0.0, 0.0, 0.0), iconPadding: - const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of(context).customColor1, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).secondaryText, - fontSize: 16.0, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: - GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), - ), + const EdgeInsetsDirectional + .fromSTEB(0.0, + 0.0, 0.0, 0.0), + color: + FlutterFlowTheme.of( + context) + .customColor1, + textStyle: + FlutterFlowTheme.of( + context) + .titleSmall + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme.of( + context) + .secondaryText, + fontSize: + 16.0, + letterSpacing: + 0.0, + fontWeight: + FontWeight + .w500, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), + ), elevation: 3.0, - borderSide: const BorderSide( - color: Colors.transparent, + borderSide: + const BorderSide( + color: Colors + .transparent, width: 1.0, ), - borderRadius: BorderRadius.circular(12.0), + borderRadius: + BorderRadius + .circular(12.0), ), - showLoadingIndicator: false, + showLoadingIndicator: + false, ), ), ), - ].divide(const SizedBox(width: 7.0))); + ].divide( + const SizedBox(width: 7.0))); } }, ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0), + padding: + const EdgeInsetsDirectional.fromSTEB( + 0.0, 12.0, 0.0, 12.0), child: InkWell( - key: const ValueKey('ForgotPassword'), + key: const ValueKey( + 'ForgotPassword'), splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { await showModalBottomSheet( - isScrollControlled: true, - backgroundColor: Colors.transparent, - context: context, - builder: (context) { - return Padding( - padding: MediaQuery.viewInsetsOf(context), - child: const ForgotPasswordTemplateComponentWidget(), - ); - }).then((value) => safeSetState(() {})); + isScrollControlled: true, + backgroundColor: + Colors.transparent, + context: context, + builder: (context) { + return Padding( + padding: MediaQuery + .viewInsetsOf( + context), + child: + const ForgotPasswordTemplateComponentWidget(), + ); + }) + .then((value) => + safeSetState(() {})); }, child: RichText( - textScaler: MediaQuery.of(context).textScaler, + textScaler: + MediaQuery.of(context).textScaler, text: TextSpan( children: [ TextSpan( - text: FFLocalizations.of(context).getText( + text: + FFLocalizations.of(context) + .getText( '05dx91ku' /* Você esqueceu a sua senha? */, ), style: TextStyle( - color: FlutterFlowTheme.of(context).primaryText, - fontSize: limitedInputFontSize, + color: FlutterFlowTheme.of( + context) + .primaryText, + fontSize: + limitedInputFontSize, ), ), TextSpan( - text: FFLocalizations.of(context) - .getText('p5c6d54y' /* Recupere aqui */), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primary, - fontSize: limitedInputFontSize, - letterSpacing: 0.0, - fontWeight: FontWeight.normal, - useGoogleFonts: - GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), - ), - mouseCursor: SystemMouseCursors.click, + text: FFLocalizations.of( + context) + .getText( + 'p5c6d54y' /* Recupere aqui */), + style: + FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + 'Plus Jakarta Sans', + color: FlutterFlowTheme + .of(context) + .primary, + fontSize: + limitedInputFontSize, + letterSpacing: 0.0, + fontWeight: + FontWeight.normal, + useGoogleFonts: + GoogleFonts + .asMap() + .containsKey( + 'Plus Jakarta Sans'), + ), + mouseCursor: + SystemMouseCursors.click, ) ], - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - fontSize: limitedInputFontSize), + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of( + context) + .bodyMediumFamily, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .bodyMediumFamily), + fontSize: + limitedInputFontSize), ), ), ), @@ -594,7 +950,8 @@ class _SignInTemplateComponentWidgetState extends State { ); } - PreferredSizeWidget _buildAppBar(BuildContext context, FlutterFlowTheme theme) { + PreferredSizeWidget _buildAppBar( + BuildContext context, FlutterFlowTheme theme) { return AppBar( backgroundColor: theme.primaryBackground, automaticallyImplyLeading: false, @@ -96,7 +97,8 @@ class _AboutSystemPageState extends State { fontSize: 16.0, fontWeight: FontWeight.bold, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineMediumFamily), + useGoogleFonts: GoogleFonts.asMap() + .containsKey(FlutterFlowTheme.of(context).headlineMediumFamily), ), ); } @@ -167,7 +169,8 @@ class _AboutSystemPageState extends State { color: theme.primaryText, fontSize: 16.0, letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), + useGoogleFonts: + GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), ), ); } diff --git a/lib/features/notification/deep_link_service.dart b/lib/features/notification/deep_link_service.dart index cf7e13f2..4f6ba58d 100644 --- a/lib/features/notification/deep_link_service.dart +++ b/lib/features/notification/deep_link_service.dart @@ -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, diff --git a/lib/firebase_options.dart b/lib/firebase_options.dart index aeaf3d67..198a8ed2 100644 --- a/lib/firebase_options.dart +++ b/lib/firebase_options.dart @@ -73,9 +73,10 @@ class DefaultFirebaseOptions { projectId: 'accessmoblie-da839', databaseURL: 'https://accessmoblie-da839.firebaseio.com', storageBucket: 'accessmoblie-da839.firebasestorage.app', - androidClientId: '187064172787-7et0qu5p2qtmisvqgndn3kfi1b7u9ifl.apps.googleusercontent.com', - iosClientId: '187064172787-c5gs7fvp78om9r7dofkjn2qmpumkuvig.apps.googleusercontent.com', + androidClientId: + '187064172787-7et0qu5p2qtmisvqgndn3kfi1b7u9ifl.apps.googleusercontent.com', + iosClientId: + '187064172787-c5gs7fvp78om9r7dofkjn2qmpumkuvig.apps.googleusercontent.com', iosBundleId: 'br.com.freaccess.hub', ); - -} \ No newline at end of file +} diff --git a/lib/flutter_flow/nav/nav.dart b/lib/flutter_flow/nav/nav.dart index b7efd477..600a43ad 100644 --- a/lib/flutter_flow/nav/nav.dart +++ b/lib/flutter_flow/nav/nav.dart @@ -86,11 +86,20 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) { builder: (context, _) { return FutureBuilder( future: () async { - final bool isLogged = await StorageHelper().get(SecureStorageKey.isLogged.value) == 'true'; - final bool haveLocal = await StorageHelper().get(SecureStorageKey.haveLocal.value) == 'true'; + final bool isLogged = + await StorageHelper().get(SecureStorageKey.isLogged.value) == + 'true'; + final bool haveLocal = + await StorageHelper().get(SecureStorageKey.haveLocal.value) == + 'true'; final bool haveUserUUID = - (await StorageHelper().get(ProfileStorageKey.userUUID.key))?.isNotEmpty ?? false; - final bool haveDevUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key))?.isNotEmpty ?? false; + (await StorageHelper().get(ProfileStorageKey.userUUID.key)) + ?.isNotEmpty ?? + false; + final bool haveDevUUID = + (await StorageHelper().get(ProfileStorageKey.devUUID.key)) + ?.isNotEmpty ?? + false; if (isLogged && haveDevUUID && haveUserUUID) { return haveLocal @@ -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( 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 Function(BuildContext context)? update = params.getParam('update', ParamType.Function); + final Future 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 { Map get withoutNulls => Map.fromEntries( - entries.where((e) => e.value != null).map((e) => MapEntry(e.key, e.value!)), + entries + .where((e) => e.value != null) + .map((e) => MapEntry(e.key, e.value!)), ); } @@ -266,7 +321,8 @@ extension NavigationExtensions on BuildContext { } extension _GoRouterStateExtensions on GoRouterState { - Map get extraMap => extra != null ? extra as Map : {}; + Map get extraMap => + extra != null ? extra as Map : {}; Map get allParams => {} ..addAll(pathParameters) ..addAll(uri.queryParameters) @@ -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 futureParamValues = {}; bool get isEmpty => - state.allParams.isEmpty || (state.allParams.length == 1 && state.extraMap.containsKey(kTransitionInfoKey)); - bool isAsyncParam(MapEntry param) => asyncParams.containsKey(param.key) && param.value is String; + state.allParams.isEmpty || + (state.allParams.length == 1 && + state.extraMap.containsKey(kTransitionInfoKey)); + bool isAsyncParam(MapEntry param) => + asyncParams.containsKey(param.key) && param.value is String; bool get hasFutures => state.allParams.entries.any(isAsyncParam); Future completeFutures() => Future.wait( state.allParams.entries.where(isAsyncParam).map( (param) async { - final doc = await asyncParams[param.key]!(param.value).onError((_, __) => null); + final doc = await asyncParams[param.key]!(param.value) + .onError((_, __) => null); if (doc != null) { futureParamValues[param.key] = doc; return true; @@ -309,12 +370,15 @@ class FFParameters { ), ).onError((_, __) => [false]).then((v) => v.every((e) => e)); - dynamic getParam(String paramName, ParamType type, {bool isList = false, StructBuilder? structBuilder}) { - if (futureParamValues.containsKey(paramName)) return futureParamValues[paramName]; + dynamic getParam(String paramName, ParamType type, + {bool isList = false, StructBuilder? structBuilder}) { + if (futureParamValues.containsKey(paramName)) + return futureParamValues[paramName]; if (!state.allParams.containsKey(paramName)) return null; final param = state.allParams[paramName]; if (param is! String) return param; - return deserializeParam(param, type, isList, structBuilder: structBuilder); + return deserializeParam(param, type, isList, + structBuilder: structBuilder); } } @@ -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(); final isRootPage = rootPageContext?.isRootPage ?? false; final location = GoRouterState.of(context).uri.toString(); - return isRootPage && location != '/' && location != rootPageContext?.errorRoute; + return isRootPage && + location != '/' && + location != rootPageContext?.errorRoute; } static Widget wrap(Widget child, {String? errorRoute}) => diff --git a/lib/initialization.dart b/lib/initialization.dart index 21594416..04aa29c6 100644 --- a/lib/initialization.dart +++ b/lib/initialization.dart @@ -58,7 +58,8 @@ Future _initializeSystemSettings() async { if (kDebugMode) { //kDebugMode print('Debug mode'); - bool unsentReports = await FirebaseCrashlytics.instance.checkForUnsentReports(); + bool unsentReports = + await FirebaseCrashlytics.instance.checkForUnsentReports(); if (unsentReports) { // Existem relatórios não enviados await crashlyticsInstance.sendUnsentReports(); diff --git a/lib/pages/forgot_password_page/forgot_password_screen.dart b/lib/pages/forgot_password_page/forgot_password_screen.dart index da97657c..99d0914d 100644 --- a/lib/pages/forgot_password_page/forgot_password_screen.dart +++ b/lib/pages/forgot_password_page/forgot_password_screen.dart @@ -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 createState() => _ForgotPasswordScreenState(); } -class _ForgotPasswordScreenState extends State with TickerProviderStateMixin { +class _ForgotPasswordScreenState extends State + with TickerProviderStateMixin { late ForgotPasswordScreenModel _model; final animationsMap = {}; @@ -148,7 +150,8 @@ class _ForgotPasswordScreenState extends State 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 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 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 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('SubmitButtonWidget'), onPressed: _model.isFormInvalid() @@ -248,16 +266,22 @@ class _ForgotPasswordScreenState extends State 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 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 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 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, ), diff --git a/lib/shared/constants/index.dart b/lib/shared/constants/index.dart index e69de29b..8b137891 100644 --- a/lib/shared/constants/index.dart +++ b/lib/shared/constants/index.dart @@ -0,0 +1 @@ +