From ed33d32930307176d45980d905c524162b46d6cb Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Fri, 20 Dec 2024 16:41:21 -0300 Subject: [PATCH] wip labels --- .../shared_components_atoms/appbar.dart | 10 ++------- .../pages/acess_history_page_widget.dart | 10 ++------- .../pages/provisional_history_page.dart | 10 ++------- .../home/presentation/pages/about_system.dart | 10 ++------- .../delivery_schedule_widget.dart | 10 ++------- .../liberation_history_widget.dart | 10 ++------- .../message_history_page_widget.dart | 10 ++------- .../package_order_page.dart | 15 +++++-------- .../people_on_the_property_page_widget.dart | 10 ++------- .../pets_history_screen.dart | 19 +++++++---------- .../preferences_settings_model.dart | 3 +++ .../preferences_settings_widget.dart | 17 ++++++--------- .../provisional_schedule_widget.dart | 10 ++------- .../qr_code_page/qr_code_page_widget.dart | 21 +++---------------- .../register_visitor_page_widget.dart | 11 ++-------- .../residents_on_the_property_screen.dart | 15 +++++-------- .../vehicles_on_the_property.dart | 15 +++++-------- .../visits_on_the_property_screen.dart | 15 +++++-------- lib/shared/utils/style_util.dart | 16 ++++++++++++++ 19 files changed, 75 insertions(+), 162 deletions(-) create mode 100644 lib/shared/utils/style_util.dart diff --git a/lib/components/atomic_components/shared_components_atoms/appbar.dart b/lib/components/atomic_components/shared_components_atoms/appbar.dart index 6fe9a824..1db784d7 100644 --- a/lib/components/atomic_components/shared_components_atoms/appbar.dart +++ b/lib/components/atomic_components/shared_components_atoms/appbar.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; +import 'package:hub/shared/utils/style_util.dart'; class AppBarUtil extends StatelessWidget implements PreferredSizeWidget { final String title; @@ -36,14 +37,7 @@ class AppBarUtil extends StatelessWidget implements PreferredSizeWidget { ), title: Text( title, - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ), actions: [ if (actionButton != null) actionButton!, diff --git a/lib/features/history/presentation/pages/acess_history_page_widget.dart b/lib/features/history/presentation/pages/acess_history_page_widget.dart index b97d5450..a033a071 100644 --- a/lib/features/history/presentation/pages/acess_history_page_widget.dart +++ b/lib/features/history/presentation/pages/acess_history_page_widget.dart @@ -12,6 +12,7 @@ import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; import 'package:rxdart/rxdart.dart'; @immutable @@ -110,14 +111,7 @@ class _AccessHistoryState extends State { Widget _title(BuildContext context, FlutterFlowTheme theme) { return Text( FFLocalizations.of(context).getText('ch8qymga'), - style: theme.headlineMedium.override( - fontFamily: theme.headlineMediumFamily, - color: theme.primaryText, - fontSize: 16.0, - letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), - ), + style: DesignUtil.appbarStyle(), ); } diff --git a/lib/features/history/presentation/pages/provisional_history_page.dart b/lib/features/history/presentation/pages/provisional_history_page.dart index e69fc452..e7672e6f 100644 --- a/lib/features/history/presentation/pages/provisional_history_page.dart +++ b/lib/features/history/presentation/pages/provisional_history_page.dart @@ -14,6 +14,7 @@ import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; import 'package:hub/shared/utils/snackbar_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; import 'package:rxdart/rxdart.dart'; @immutable @@ -110,14 +111,7 @@ class ProvisionalHistoryState extends State { ptText: 'Consultar Agendas', enText: 'Provisional History', ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - fontWeight: FontWeight.bold, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ); } diff --git a/lib/features/home/presentation/pages/about_system.dart b/lib/features/home/presentation/pages/about_system.dart index 388a464a..3d934065 100644 --- a/lib/features/home/presentation/pages/about_system.dart +++ b/lib/features/home/presentation/pages/about_system.dart @@ -7,6 +7,7 @@ import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/internationalization.dart'; +import 'package:hub/shared/utils/style_util.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -87,14 +88,7 @@ class _AboutSystemPageState extends State { ptText: 'Sobre o Sistema', enText: 'About the System', ), - style: theme.headlineMedium.override( - fontFamily: theme.headlineMediumFamily, - color: theme.primaryText, - fontSize: 16.0, - letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), - ), + style: DesignUtil.appbarStyle(), ); } diff --git a/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart b/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart index 46d3c440..cc661034 100644 --- a/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart +++ b/lib/pages/delivery_schedule_page/delivery_schedule_widget.dart @@ -4,6 +4,7 @@ import 'package:hub/components/templates_components/provisional_schedule_templat import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; +import 'package:hub/shared/utils/style_util.dart'; import '/flutter_flow/flutter_flow_util.dart'; @@ -54,14 +55,7 @@ class _DeliveryScheduleState extends State { enText: 'Delivery Schedule', ptText: 'Agendar Entregas', ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - fontWeight: FontWeight.bold, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ), actions: const [], centerTitle: true, diff --git a/lib/pages/liberation_history/liberation_history_widget.dart b/lib/pages/liberation_history/liberation_history_widget.dart index 53c22e26..dc8a9b50 100644 --- a/lib/pages/liberation_history/liberation_history_widget.dart +++ b/lib/pages/liberation_history/liberation_history_widget.dart @@ -13,6 +13,7 @@ import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; import 'package:hub/shared/utils/snackbar_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; import 'package:hub/shared/utils/validator_util.dart'; class LiberationHistoryWidget extends StatefulWidget { @@ -120,14 +121,7 @@ class _LiberationHistoryWidgetState extends State { FFLocalizations.of(context).getText( '784f83pc' /* Histórico de Liberação */, ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - fontWeight: FontWeight.bold, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ), actions: const [], centerTitle: true, diff --git a/lib/pages/message_history_page/message_history_page_widget.dart b/lib/pages/message_history_page/message_history_page_widget.dart index 98f1effd..ce9294c3 100644 --- a/lib/pages/message_history_page/message_history_page_widget.dart +++ b/lib/pages/message_history_page/message_history_page_widget.dart @@ -9,6 +9,7 @@ import 'package:hub/pages/message_history_page/message_history_page_model.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; class MessageHistoryPageWidget extends StatefulWidget { const MessageHistoryPageWidget({super.key}); @@ -164,14 +165,7 @@ class _MessageHistoryPageWidgetState extends State enText: 'Message History', ptText: 'Consultar Mensagens', ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: LimitedFontSizeUtil.getHeaderFontSize(context), - fontWeight: FontWeight.bold, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ), actions: const [], centerTitle: true, diff --git a/lib/pages/package_order_page/package_order_page.dart b/lib/pages/package_order_page/package_order_page.dart index 8bbbd340..3f2c1fb3 100644 --- a/lib/pages/package_order_page/package_order_page.dart +++ b/lib/pages/package_order_page/package_order_page.dart @@ -14,6 +14,7 @@ import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; import 'package:hub/shared/utils/validator_util.dart'; import 'package:rxdart/rxdart.dart'; @@ -233,16 +234,10 @@ class _PackageOrderPage extends State { backgroundColor: FlutterFlowTheme.of(context).primaryBackground, automaticallyImplyLeading: false, title: Text( - FFLocalizations.of(context) - .getVariableText(enText: 'Orders', ptText: 'Encomendas'), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - )), + FFLocalizations.of(context) + .getVariableText(enText: 'Orders', ptText: 'Encomendas'), + style: DesignUtil.appbarStyle(), + ), leading: _backButton(context, FlutterFlowTheme.of(context)), centerTitle: true, elevation: 0.0, diff --git a/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart b/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart index 09a545b1..5af550a6 100644 --- a/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart +++ b/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart @@ -8,6 +8,7 @@ import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/pages/people_on_the_property_page/people_on_the_property_page_model.dart'; +import 'package:hub/shared/utils/style_util.dart'; import '../../shared/utils/log_util.dart'; @@ -64,14 +65,7 @@ class _PeopleOnThePropertyPageState extends State { FFLocalizations.of(context).getText( 'nsu13r5d' /* Pessoas na Propriedade */, ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ), actions: const [], centerTitle: true, diff --git a/lib/pages/pets_on_the_property_page/pets_history_screen.dart b/lib/pages/pets_on_the_property_page/pets_history_screen.dart index 98ad75cb..f908cd71 100644 --- a/lib/pages/pets_on_the_property_page/pets_history_screen.dart +++ b/lib/pages/pets_on_the_property_page/pets_history_screen.dart @@ -13,6 +13,7 @@ import 'package:hub/pages/pets_page/pets_page_model.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; class PetsHistoryScreen extends StatefulWidget { const PetsHistoryScreen({super.key, this.model, required this.isApp}); @@ -62,18 +63,12 @@ class _PetsHistoryScreenState extends State backgroundColor: FlutterFlowTheme.of(context).primaryBackground, automaticallyImplyLeading: false, title: Text( - FFLocalizations.of(context).getVariableText( - ptText: 'Pets', - enText: 'Pets', - ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - )), + FFLocalizations.of(context).getVariableText( + ptText: 'Pets', + enText: 'Pets', + ), + style: DesignUtil.appbarStyle(), + ), leading: _backButton(context, FlutterFlowTheme.of(context)), centerTitle: true, elevation: 0.0, diff --git a/lib/pages/preferences_settings_page/preferences_settings_model.dart b/lib/pages/preferences_settings_page/preferences_settings_model.dart index 5e05a735..cd52eb59 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_model.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_model.dart @@ -1,3 +1,6 @@ +import 'dart:async'; +import 'dart:isolate'; + import 'package:flutter/material.dart'; import 'package:hub/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart'; import 'package:hub/features/auth/index.dart'; diff --git a/lib/pages/preferences_settings_page/preferences_settings_widget.dart b/lib/pages/preferences_settings_page/preferences_settings_widget.dart index 06c1d96b..e6f5f7f8 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_widget.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_widget.dart @@ -7,6 +7,7 @@ import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/pages/preferences_settings_page/preferences_settings_model.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; +import 'package:hub/shared/utils/style_util.dart'; import 'package:material_symbols_icons/symbols.dart'; import 'package:provider/provider.dart'; @@ -28,8 +29,8 @@ class _PreferencesPageWidgetState extends State { Widget build(BuildContext context) { return ChangeNotifierProvider( create: (_) => PreferencesPageModel(), - child: Consumer( - builder: (context, model, child) => GestureDetector( + child: Consumer(builder: (context, model, child) { + return GestureDetector( onTap: () => model.unfocusNode.canRequestFocus ? FocusScope.of(context).requestFocus(model.unfocusNode) : FocusScope.of(context).unfocus(), @@ -58,13 +59,7 @@ class _PreferencesPageWidgetState extends State { enText: 'System Settings', ptText: 'Opções do Sistema', ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ), centerTitle: true, elevation: 0.0, @@ -89,8 +84,8 @@ class _PreferencesPageWidgetState extends State { ], ), ), - ), - ), + ); + }), ); } diff --git a/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart b/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart index 022822ed..656c638f 100644 --- a/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart +++ b/lib/pages/provisional_schedule_page/provisional_schedule_widget.dart @@ -4,6 +4,7 @@ import 'package:hub/components/templates_components/provisional_schedule_templat import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; +import 'package:hub/shared/utils/style_util.dart'; import '/flutter_flow/flutter_flow_util.dart'; @@ -54,14 +55,7 @@ class _ProvisionalScheduleState extends State { enText: 'Schedule Providers', ptText: 'Agendar Prestadores', ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), + style: DesignUtil.appbarStyle(), ), actions: const [], centerTitle: true, diff --git a/lib/pages/qr_code_page/qr_code_page_widget.dart b/lib/pages/qr_code_page/qr_code_page_widget.dart index 0fa56484..6bc1aaf4 100644 --- a/lib/pages/qr_code_page/qr_code_page_widget.dart +++ b/lib/pages/qr_code_page/qr_code_page_widget.dart @@ -21,6 +21,7 @@ import 'package:hub/pages/qr_code_page/qr_code_page_model.dart'; import 'package:hub/shared/utils/biometric_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; +import 'package:hub/shared/utils/style_util.dart'; import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:qr_flutter/qr_flutter.dart'; @@ -126,15 +127,7 @@ class _QrCodePageWidgetState extends State enText: 'Use this QR Code for access', ), textAlign: TextAlign.center, - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: - FlutterFlowTheme.of(context).bodyMediumFamily, - fontSize: limitedHeaderTextSize, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey( - FlutterFlowTheme.of(context).bodyMediumFamily), - ), + style: DesignUtil.appbarStyle(), ), ), Stack( @@ -490,15 +483,7 @@ class _QrCodePageWidgetState extends State ), title: Text( FFLocalizations.of(context).getText('ku7jqe53'), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - fontWeight: FontWeight.bold, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey( - FlutterFlowTheme.of(context).headlineMediumFamily), - ), + style: DesignUtil.appbarStyle(), ), actions: const [], centerTitle: true, diff --git a/lib/pages/register_visitor_page/register_visitor_page_widget.dart b/lib/pages/register_visitor_page/register_visitor_page_widget.dart index 483364bf..6fc5c530 100644 --- a/lib/pages/register_visitor_page/register_visitor_page_widget.dart +++ b/lib/pages/register_visitor_page/register_visitor_page_widget.dart @@ -4,6 +4,7 @@ import 'package:hub/components/templates_components/regisiter_vistor_template_co import 'package:hub/flutter_flow/flutter_flow_icon_button.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; +import 'package:hub/shared/utils/style_util.dart'; import '/flutter_flow/flutter_flow_util.dart'; import 'register_visitor_page_model.dart'; @@ -60,15 +61,7 @@ class _RegisterVisitorPageWidgetState extends State { FFLocalizations.of(context).getText( 'megskb6s' /* Cadastrar Visitante */, ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - fontWeight: FontWeight.bold, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey( - FlutterFlowTheme.of(context).headlineMediumFamily), - ), + style: DesignUtil.appbarStyle(), ), actions: const [], centerTitle: true, diff --git a/lib/pages/residents_on_the_property/residents_on_the_property_screen.dart b/lib/pages/residents_on_the_property/residents_on_the_property_screen.dart index d33aa753..3170e3af 100644 --- a/lib/pages/residents_on_the_property/residents_on_the_property_screen.dart +++ b/lib/pages/residents_on_the_property/residents_on_the_property_screen.dart @@ -9,6 +9,7 @@ import 'package:hub/pages/residents_on_the_property/residents_on_the_property_mo import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; class ResidentsOnTheProperty extends StatefulWidget { const ResidentsOnTheProperty({super.key}); @@ -136,16 +137,10 @@ class _ResidentsOnThePropertyState extends State backgroundColor: FlutterFlowTheme.of(context).primaryBackground, automaticallyImplyLeading: false, title: Text( - FFLocalizations.of(context) - .getVariableText(ptText: 'Moradores', enText: 'Residents'), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - )), + FFLocalizations.of(context) + .getVariableText(ptText: 'Moradores', enText: 'Residents'), + style: DesignUtil.appbarStyle(), + ), leading: _backButton(context, FlutterFlowTheme.of(context)), centerTitle: true, elevation: 0.0, diff --git a/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart b/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart index 6d3e51e0..0f448b61 100644 --- a/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart +++ b/lib/pages/vehicles_on_the_property/vehicles_on_the_property.dart @@ -9,6 +9,7 @@ import 'package:hub/pages/vehicles_on_the_property/vehicle_model.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/log_util.dart'; +import 'package:hub/shared/utils/style_util.dart'; class VehicleOnTheProperty extends StatefulWidget { const VehicleOnTheProperty({super.key}); @@ -131,16 +132,10 @@ class _VehicleOnThePropertyState extends State backgroundColor: FlutterFlowTheme.of(context).primaryBackground, automaticallyImplyLeading: false, title: Text( - FFLocalizations.of(context) - .getVariableText(enText: 'Vehicles', ptText: 'Veículos'), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - )), + FFLocalizations.of(context) + .getVariableText(enText: 'Vehicles', ptText: 'Veículos'), + style: DesignUtil.appbarStyle(), + ), leading: _backButton(context, FlutterFlowTheme.of(context)), centerTitle: true, elevation: 0.0, diff --git a/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart b/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart index 3a2b6950..652f00ae 100644 --- a/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart +++ b/lib/pages/visits_on_the_property/visits_on_the_property_screen.dart @@ -9,6 +9,7 @@ import 'package:hub/pages/visits_on_the_property/model.dart'; import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/log_util.dart'; import 'package:hub/shared/utils/limited_text_size.dart'; +import 'package:hub/shared/utils/style_util.dart'; class VisitsOnTheProperty extends StatefulWidget { const VisitsOnTheProperty({super.key}); @@ -134,16 +135,10 @@ class _VisitsOnThePropertyState extends State backgroundColor: FlutterFlowTheme.of(context).primaryBackground, automaticallyImplyLeading: false, title: Text( - FFLocalizations.of(context).getVariableText( - ptText: 'Visitas em aberto', enText: 'Opened visits'), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 15.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - )), + FFLocalizations.of(context).getVariableText( + ptText: 'Visitas em aberto', enText: 'Opened visits'), + style: DesignUtil.appbarStyle(), + ), leading: _backButton(context, FlutterFlowTheme.of(context)), centerTitle: true, elevation: 0.0, diff --git a/lib/shared/utils/style_util.dart b/lib/shared/utils/style_util.dart new file mode 100644 index 00000000..ef5bd7e6 --- /dev/null +++ b/lib/shared/utils/style_util.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:hub/flutter_flow/index.dart'; + +class DesignUtil { + static appbarStyle() { + FlutterFlowTheme.of(navigatorKey.currentContext!).headlineMedium.override( + fontFamily: 'Nunito', + color: FlutterFlowTheme.of(navigatorKey.currentContext!).primaryText, + fontSize: 15.0, + fontWeight: FontWeight.bold, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), + ); + } +}