diff --git a/.vscode/settings.json b/.vscode/settings.json index 9892690e..7f89760e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,8 @@ { - "editor.quickSuggestions": { - "comments": "off", - "strings": "off", - "other": "off" - } -} \ No newline at end of file + "editor.quickSuggestions": { + "comments": "off", + "strings": "off", + "other": "off" + }, + "java.configuration.updateBuildConfiguration": "automatic" +} diff --git a/android/app/build.gradle b/android/app/build.gradle index 6ec0d534..0410d96b 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -73,10 +73,7 @@ android { storePassword keystoreProperties['storePassword'] } debug { - keyAlias keystoreProperties['keyAlias'] - keyPassword keystoreProperties['keyPassword'] - storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null - storePassword keystoreProperties['storePassword'] + } } diff --git a/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart b/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart index 68c1ae18..61599fb4 100644 --- a/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart +++ b/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart @@ -32,6 +32,11 @@ class _MenuButtonWidgetState extends State { @override Widget build(BuildContext context) { + final textScaler = MediaQuery.textScalerOf(context); + final double baseFontSize = 14; + final double scaledFontSize = baseFontSize * textScaler.scale(1); + final double limitedFontSize = scaledFontSize > 24 ? 12 : baseFontSize; + return InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, @@ -47,8 +52,8 @@ class _MenuButtonWidgetState extends State { child: Padding( padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0), child: Container( - width: 120.0, - height: 100.0, + width: 300, + height: 280, decoration: BoxDecoration( color: FlutterFlowTheme.of(context).primaryBackground, boxShadow: [ @@ -96,7 +101,7 @@ class _MenuButtonWidgetState extends State { style: FlutterFlowTheme.of(context).titleLarge.override( fontFamily: 'Nunito', color: FlutterFlowTheme.of(context).primaryText, - fontSize: 14.0, + fontSize: limitedFontSize, letterSpacing: 0.0, fontWeight: FontWeight.w500, useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), diff --git a/lib/components/atomic_components/shared_components_atoms/custom_input.dart b/lib/components/atomic_components/shared_components_atoms/custom_input.dart index 765c2c7e..51d0fbad 100644 --- a/lib/components/atomic_components/shared_components_atoms/custom_input.dart +++ b/lib/components/atomic_components/shared_components_atoms/custom_input.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; +import 'package:hub/shared/utils/limited_text_size.dart'; // ignore: must_be_immutable class CustomInputUtil extends StatefulWidget { @@ -48,6 +49,8 @@ class _CustomInputUtilState extends State { @override Widget build(BuildContext context) { + double limitedInputTextSize = LimitedFontSizeUtil.getInputFontSize(context); + return Padding( padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 10.0), child: Column( @@ -81,6 +84,7 @@ class _CustomInputUtilState extends State { useGoogleFonts: GoogleFonts.asMap().containsKey( FlutterFlowTheme.of(context).labelMediumFamily, ), + fontSize: limitedInputTextSize, ), hintText: widget.hintText, hintStyle: FlutterFlowTheme.of(context).labelMedium.override( @@ -90,6 +94,11 @@ class _CustomInputUtilState extends State { useGoogleFonts: GoogleFonts.asMap().containsKey( FlutterFlowTheme.of(context).labelMediumFamily, ), + fontSize: limitedInputTextSize, + ), + helperStyle: TextStyle( + fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontSize: limitedInputTextSize, ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( @@ -112,6 +121,11 @@ class _CustomInputUtilState extends State { ), borderRadius: BorderRadius.circular(10.0), ), + errorStyle: TextStyle( + fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + color: FlutterFlowTheme.of(context).error, + fontSize: limitedInputTextSize, + ), focusedErrorBorder: OutlineInputBorder( borderSide: BorderSide( color: FlutterFlowTheme.of(context).error, @@ -131,6 +145,7 @@ class _CustomInputUtilState extends State { useGoogleFonts: GoogleFonts.asMap().containsKey( FlutterFlowTheme.of(context).bodyMediumFamily, ), + fontSize: limitedInputTextSize, ), maxLines: null, maxLength: widget.haveMaxLength ? widget.maxLength : null, diff --git a/lib/components/atomic_components/shared_components_atoms/custom_select.dart b/lib/components/atomic_components/shared_components_atoms/custom_select.dart index 14a97d94..e21a0d80 100644 --- a/lib/components/atomic_components/shared_components_atoms/custom_select.dart +++ b/lib/components/atomic_components/shared_components_atoms/custom_select.dart @@ -4,6 +4,7 @@ import 'package:hub/flutter_flow/flutter_flow_drop_down.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/form_field_controller.dart'; +import 'package:hub/shared/utils/limited_text_size.dart'; // ignore: must_be_immutable class CustomSelect extends StatefulWidget { @@ -40,6 +41,9 @@ class _CustomSelectState extends State { @override Widget build(BuildContext context) { + + double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); + return Padding( padding: const EdgeInsetsDirectional.fromSTEB(0, 0.0, 0, 10.0), child: Column( @@ -68,6 +72,7 @@ class _CustomSelectState extends State { letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + fontSize: limitedInputFontSize, ), hintText: widget.hintText, icon: Icon( @@ -110,6 +115,7 @@ class _CustomSelectState extends State { letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily), + fontSize: limitedInputFontSize )), ), ], diff --git a/lib/components/atomic_components/shared_components_atoms/media_upload_button.dart b/lib/components/atomic_components/shared_components_atoms/media_upload_button.dart index 4d9a87d9..4f44136d 100644 --- a/lib/components/atomic_components/shared_components_atoms/media_upload_button.dart +++ b/lib/components/atomic_components/shared_components_atoms/media_upload_button.dart @@ -4,6 +4,7 @@ import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/flutter_flow_widgets.dart'; import 'package:hub/flutter_flow/upload_data.dart'; +import 'package:hub/shared/utils/limited_text_size.dart'; // ignore: must_be_immutable class MediaUploadButtonUtil extends StatefulWidget { @@ -32,139 +33,175 @@ class _MediaUploadButtonUtilState extends State { @override Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), - child: Builder( - builder: (context) { - if (widget.uploadedFiles != null && widget.uploadedFiles!.bytes!.isNotEmpty) { - { - return InkWell( - splashColor: Colors.transparent, - focusColor: Colors.transparent, - hoverColor: Colors.transparent, - highlightColor: Colors.transparent, - onTap: () async { - setState(() { - widget.isUploading = false; - widget.uploadedFiles = FFUploadedFile(bytes: Uint8List.fromList([])); - widget.onUploadComplete(widget.uploadedFiles!); - }); - }, - child: ClipRRect( - borderRadius: BorderRadius.circular(8.0), - child: Image.memory( - widget.uploadedFiles!.bytes ?? Uint8List.fromList([]), - width: 300.0, - height: 200.0, - fit: BoxFit.cover, - ), - ), - ); - } - } else { - return Stack( - children: [ - Align( - alignment: const AlignmentDirectional(0.0, 0.0), - child: FFButtonWidget( - onPressed: () async { - final selectedMedia = await selectMediaWithSourceBottomSheet( - context: context, - imageQuality: 100, - allowPhoto: true, - includeDimensions: true, - ); - if (selectedMedia != null) { - setState(() => widget.isUploading = true); - var selectedUploadedFiles = []; + double limitedInputTextSize = LimitedFontSizeUtil.getInputFontSize(context); + bool _isLoading = false; - try { - final message = FFLocalizations.of(context) - .getVariableText(enText: 'Uploading file...', ptText: 'Enviando arquivo...'); - showUploadMessage( - context, - message, - showLoading: true, - ); - selectedUploadedFiles = selectedMedia - .map((m) => FFUploadedFile( - name: m.storagePath.split('/').last, - bytes: m.bytes, - height: m.dimensions?.height, - width: m.dimensions?.width, - // blurHash: m.blurHash, - )) - .toList(); - } finally { - ScaffoldMessenger.of(context).hideCurrentSnackBar(); - widget.isUploading = false; - } - if (selectedUploadedFiles.length == selectedMedia.length) { - setState(() { - widget.uploadedFiles = selectedUploadedFiles.first; - }); - widget.onUploadComplete(widget.uploadedFiles!); - final message = - FFLocalizations.of(context).getVariableText(enText: 'Success!', ptText: 'Sucesso!'); - showUploadMessage(context, message); - } else { - setState(() {}); - final message = FFLocalizations.of(context) - .getVariableText(enText: 'Failed to upload data', ptText: 'Falha ao enviar dados'); - showUploadMessage(context, message); - return; - } - } - }, - text: '', - icon: Icon( - Icons.photo_camera, - color: FlutterFlowTheme.of(context).accent1, - size: 30.0, - ), - options: FFButtonOptions( - width: double.infinity, - height: 120.0, - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 20.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB(14.0, 0.0, 0.0, 20.0), - color: FlutterFlowTheme.of(context).primaryBackground, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: FlutterFlowTheme.of(context).titleSmallFamily, - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 16.0, - letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily), - ), - borderSide: BorderSide( - color: FlutterFlowTheme.of(context).accent1, - width: 0.2, - ), - borderRadius: BorderRadius.circular(8.0), - ), - ), + return Builder( + builder: (context) { + if (widget.uploadedFiles != null && + widget.uploadedFiles!.bytes!.isNotEmpty) { + { + return InkWell( + splashColor: Colors.transparent, + focusColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: Colors.transparent, + onTap: () async { + setState(() { + widget.isUploading = false; + widget.uploadedFiles = + FFUploadedFile(bytes: Uint8List.fromList([])); + widget.onUploadComplete(widget.uploadedFiles!); + }); + }, + child: ClipRRect( + borderRadius: BorderRadius.circular(8.0), + child: Image.memory( + widget.uploadedFiles!.bytes ?? Uint8List.fromList([]), + width: 300.0, + height: 200.0, + fit: BoxFit.cover, ), - Align( - alignment: const AlignmentDirectional(0.0, 0.0), - child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(10.0, 65.0, 10.0, 0.0), - child: Text( - widget.labelText, - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, - letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - ), - ), - ), - ), - ], + ), ); } - }, - ), + } else { + return Stack( + children: [ + Align( + alignment: const AlignmentDirectional(0.0, 0.0), + child: GestureDetector( + onTap: () async { + setState(() { + _isLoading = true; + }); + final selectedMedia = await selectMediaWithSourceBottomSheet( + context: context, + imageQuality: 100, + allowPhoto: true, + includeDimensions: true, + ); + if (selectedMedia != null) { + setState(() => widget.isUploading = true); + var selectedUploadedFiles = []; + + try { + final message = FFLocalizations.of(context) + .getVariableText( + enText: 'Uploading file...', + ptText: 'Enviando arquivo...'); + showUploadMessage( + context, + message, + showLoading: true, + ); + selectedUploadedFiles = selectedMedia + .map((m) => FFUploadedFile( + name: m.storagePath.split('/').last, + bytes: m.bytes, + height: m.dimensions?.height, + width: m.dimensions?.width, + // blurHash: m.blurHash, + )) + .toList(); + } finally { + ScaffoldMessenger.of(context).hideCurrentSnackBar(); + widget.isUploading = false; + } + if (selectedUploadedFiles.length == + selectedMedia.length) { + setState(() { + widget.uploadedFiles = selectedUploadedFiles.first; + }); + widget.onUploadComplete(widget.uploadedFiles!); + final message = FFLocalizations.of(context) + .getVariableText( + enText: 'Success!', ptText: 'Sucesso!'); + showUploadMessage(context, message); + } else { + setState(() { + _isLoading = false; + }); + final message = FFLocalizations.of(context) + .getVariableText( + enText: 'Failed to upload data', + ptText: 'Falha ao enviar dados'); + showUploadMessage(context, message); + return; + } }else{ + setState(() { + _isLoading = false; + }); + } + }, + child: Center( + child: Container( + width: MediaQuery.of(context).size.width * 0.8, + height: 120, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8.0), + border: Border.all( + color: FlutterFlowTheme.of(context).customColor6, + width: 1.0, + ), + ), + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + _isLoading + ? SizedBox( + width: 30.0, + height: 30.0, + child: CircularProgressIndicator( + valueColor: + AlwaysStoppedAnimation( + FlutterFlowTheme.of(context) + .primary, + ), + ), + ) + : Icon( + Icons.photo_camera, + color: FlutterFlowTheme.of(context) + .primary, + size: 30.0, + ), + Padding( + padding: + const EdgeInsets.fromLTRB(0, 15, 0, 0), + child: Text( + FFLocalizations.of(context).getText( + 'p4ftwxcy', + ), + textAlign: TextAlign.center, + style: FlutterFlowTheme.of(context) + .titleSmall + .override( + fontFamily: + FlutterFlowTheme.of(context) + .titleSmallFamily, + color: FlutterFlowTheme.of(context) + .primaryText, + fontSize: limitedInputTextSize, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .titleSmallFamily), + ), + ), + ) + ], + ), + ), + ), + ), + ), + ], + ); + } + }, ); } } diff --git a/lib/components/atomic_components/shared_components_atoms/tabview.dart b/lib/components/atomic_components/shared_components_atoms/tabview.dart index 0f4d0f61..3ae0d4dd 100644 --- a/lib/components/atomic_components/shared_components_atoms/tabview.dart +++ b/lib/components/atomic_components/shared_components_atoms/tabview.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; +import 'package:hub/shared/utils/limited_text_size.dart'; // ignore: must_be_immutable class TabViewUtil extends StatelessWidget { @@ -38,7 +39,7 @@ class TabViewUtil extends StatelessWidget { unselectedLabelColor: FlutterFlowTheme.of(context).primaryText, labelStyle: FlutterFlowTheme.of(context).titleMedium.override( fontFamily: FlutterFlowTheme.of(context).titleMediumFamily, - fontSize: 13.0, + fontSize: LimitedFontSizeUtil.getBodyFontSize(context), letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleMediumFamily), ), diff --git a/lib/components/atomic_components/shared_components_atoms/toast.dart b/lib/components/atomic_components/shared_components_atoms/toast.dart index aad47149..1be2a15e 100644 --- a/lib/components/atomic_components/shared_components_atoms/toast.dart +++ b/lib/components/atomic_components/shared_components_atoms/toast.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; +import 'package:hub/shared/utils/limited_text_size.dart'; class ToastUtil { static void showToast({ @@ -8,7 +9,7 @@ class ToastUtil { Toast toastLength = Toast.LENGTH_SHORT, Color backgroundColor = Colors.black, Color textColor = Colors.white, - double fontSize = 16.0, + double fontSize = 16, }) { Fluttertoast.showToast( msg: message, diff --git a/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart b/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart index e516d396..db8cd7e4 100644 --- a/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart +++ b/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart @@ -4,6 +4,7 @@ import 'package:hub/components/molecular_components/message_opt_modal/opt_modal_ 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/shared/utils/limited_text_size.dart'; class OptModalWidget extends StatefulWidget { final String defaultPersonType; @@ -77,7 +78,9 @@ class _OptModalWidgetState extends State { context.pop(filterResult); } - Widget _buildCheckboxListTile(String key, List> options, double fontsize) { + Widget _buildCheckboxListTile( + String key, List> options, double fontsize) { + double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); return Column( children: [ Row( @@ -91,7 +94,7 @@ class _OptModalWidgetState extends State { textAlign: TextAlign.left, style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, - fontSize: fontsize, + fontSize: limitedInputFontSize, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), color: FlutterFlowTheme.of(context).primaryText, @@ -112,7 +115,7 @@ class _OptModalWidgetState extends State { style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, letterSpacing: 0.0, - fontSize: fontsize, + fontSize: limitedInputFontSize, useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), color: FlutterFlowTheme.of(context).primaryText, ), @@ -166,6 +169,7 @@ class _OptModalWidgetState extends State { Widget build(BuildContext context) { double screenWidth = MediaQuery.of(context).size.width; + return Center( child: Container( width: screenWidth - (screenWidth * 0.35), @@ -189,7 +193,8 @@ class _OptModalWidgetState extends State { style: FlutterFlowTheme.of(context).headlineMedium.override( fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, color: FlutterFlowTheme.of(context).primaryText, - fontSize: 18.0, + fontSize: LimitedFontSizeUtil.getHeaderFontSize( + context), letterSpacing: 0.0, fontWeight: FontWeight.bold, useGoogleFonts: @@ -218,7 +223,15 @@ class _OptModalWidgetState extends State { foregroundColor: FlutterFlowTheme.of(context).info, backgroundColor: FlutterFlowTheme.of(context).primary, ), - child: Text(FFLocalizations.of(context).getText('88kshkph')), + child: Text(FFLocalizations.of(context).getText('88kshkph'), style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + color: FlutterFlowTheme.of(context).info, + fontSize: LimitedFontSizeUtil.getInputFontSize(context), + letterSpacing: 0.0, + fontWeight: FontWeight.bold, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), + )), ), ], ), diff --git a/lib/components/molecular_components/order_filter_modal/order_filter_modal_widget.dart b/lib/components/molecular_components/order_filter_modal/order_filter_modal_widget.dart index d1e1b79a..de1a19dd 100644 --- a/lib/components/molecular_components/order_filter_modal/order_filter_modal_widget.dart +++ b/lib/components/molecular_components/order_filter_modal/order_filter_modal_widget.dart @@ -7,6 +7,8 @@ import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/shared/helpers/storage_helper.dart'; // ignore: unused_import +import 'package:hub/shared/utils/limited_text_size.dart'; + class OrderFilterModalWidget extends StatefulWidget { final String defaultAdresseeType; final String defaultStatus; @@ -169,6 +171,7 @@ class _OrderFilterModalWidgetState extends State { @override Widget build(BuildContext context) { double screenWidth = MediaQuery.of(context).size.width; + double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); return Center( child: Container( @@ -210,8 +213,9 @@ class _OrderFilterModalWidgetState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ - _buildCheckboxListTile('adresseeType', adresseeTypeOptions, 14), - _buildCheckboxListTile('status', statusOptions, 14), + _buildCheckboxListTile( + 'adresseeType', adresseeTypeOptions, limitedBodyFontSize), + _buildCheckboxListTile('status', statusOptions, limitedBodyFontSize), ], ), ), @@ -223,7 +227,7 @@ class _OrderFilterModalWidgetState extends State { foregroundColor: FlutterFlowTheme.of(context).info, backgroundColor: FlutterFlowTheme.of(context).primary, ), - child: Text(FFLocalizations.of(context).getText('88kshkph')), + child: Text(FFLocalizations.of(context).getText('88kshkph'), style: TextStyle(fontSize: limitedBodyFontSize)), ), ], ), diff --git a/lib/components/molecular_components/throw_exception/throw_exception_widget.dart b/lib/components/molecular_components/throw_exception/throw_exception_widget.dart index 41afeb2b..39cfea2b 100644 --- a/lib/components/molecular_components/throw_exception/throw_exception_widget.dart +++ b/lib/components/molecular_components/throw_exception/throw_exception_widget.dart @@ -3,6 +3,7 @@ import 'package:flutter_animate/flutter_animate.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/shared/enums/enum_throw_exception.dart'; +import 'package:hub/shared/utils/limited_text_size.dart'; import '/flutter_flow/flutter_flow_animations.dart'; import '/flutter_flow/flutter_flow_theme.dart'; @@ -91,75 +92,76 @@ class _ThrowExceptionWidgetState extends State with Ticker super.dispose(); } - - @override - Widget build(BuildContext context) { - return InkWell( - key: const ValueKey('ThrowExceptionWidget'), - splashColor: Colors.transparent, - focusColor: Colors.transparent, - hoverColor: Colors.transparent, - highlightColor: Colors.transparent, - onTap: () async { - context.pop(); - }, - child: DecoratedBox( - decoration: BoxDecoration( - color: FlutterFlowTheme.of(context).primaryBackground, - borderRadius: BorderRadius.circular(20.0), // Ajuste o valor conforme necessário - ), - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const SizedBox(height: 20.0), - Stack( - children: [ - Align( - alignment: const AlignmentDirectional(0.0, 0.0), - child: Icon( - _getIconByType(context), - color: _getColorByType(context), - size: 150.0, - ), + @override Widget build(BuildContext context) { + double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); + double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context); + return InkWell( + key: const ValueKey('ThrowExceptionWidget'), + splashColor: Colors.transparent, + focusColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: Colors.transparent, + onTap: () async { + context.pop(); + }, + child: DecoratedBox( + decoration: BoxDecoration( + color: FlutterFlowTheme.of(context).primaryBackground, + borderRadius: BorderRadius.circular(20.0), // Ajuste o valor conforme necessário + ), + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const SizedBox(height: 20.0), + Stack( + children: [ + Align( + alignment: const AlignmentDirectional(0.0, 0.0), + child: Icon( + _getIconByType(context), + color: _getColorByType(context), + size: 150.0, ), - ], - ).animateOnPageLoad(animationsMap['stackOnPageLoadAnimation']!), - const SizedBox(height: 20.0), - Column( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text( - _getTitleByType(context), + ), + ], + ).animateOnPageLoad(animationsMap['stackOnPageLoadAnimation']!), + const SizedBox(height: 20.0), + Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + _getTitleByType(context), + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + fontSize: limitedHeaderFontSize, + letterSpacing: 0.0, + fontWeight: FontWeight.bold, + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + ), + ), + Padding( + padding: const EdgeInsetsDirectional.fromSTEB(15.0, 10.0, 15.0, 0.0), + child: Text( + valueOrDefault(widget.msg, 'Message Not Found'), + overflow: TextOverflow.clip, + textAlign: TextAlign.center, style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, - fontSize: 20.0, letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + fontSize: limitedBodyFontSize, ), ), - Padding( - padding: const EdgeInsetsDirectional.fromSTEB(15.0, 10.0, 15.0, 0.0), - child: Text( - valueOrDefault(widget.msg, 'Message Not Found'), - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, - letterSpacing: 0.0, - useGoogleFonts: - GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), - ), - ), - ), - ], - ), - ], - ), + ), + ], + ), + ], ), ), - ); - } + ), + ); +} } diff --git a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart index 8712ddd3..6ee4b9ee 100644 --- a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart +++ b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart @@ -6,6 +6,7 @@ import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/shared/helpers/base_storage.dart'; import 'package:hub/shared/helpers/storage_helper.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 '../../../shared/services/authentication/authentication_service.dart'; @@ -52,7 +53,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State 20 ? 12 : scaledFontSize; + return Container( decoration: const BoxDecoration(), child: Align( @@ -85,8 +90,8 @@ class _LocalProfileComponentWidgetState extends State value == true ? onUpdate() : null); + await LocalizationService.selectLocal(context).then( + (value) => value == true ? onUpdate() : null); }, child: ClipRRect( borderRadius: BorderRadius.circular(200.0), @@ -113,22 +118,36 @@ class _LocalProfileComponentWidgetState extends State( - functions.convertToUppercase(_model.cliName), - FFLocalizations.of(context).getVariableText( - ptText: 'SEM LOCAL VINCULADO', - enText: 'NO LINKED LOCAL', + Expanded( + child: Tooltip( + message: valueOrDefault( + functions.convertToUppercase(_model.cliName), + FFLocalizations.of(context).getVariableText( + ptText: 'SEM LOCAL VINCULADO', + enText: 'NO LINKED LOCAL', + ), + ), + child: Text( + valueOrDefault( + functions.convertToUppercase(_model.cliName), + FFLocalizations.of(context).getVariableText( + ptText: 'SEM LOCAL VINCULADO', + enText: 'NO LINKED LOCAL', + ), + ), + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: FlutterFlowTheme.of(context).labelMedium.override( + fontFamily: 'Nunito', + color: FlutterFlowTheme.of(context).info, + fontSize: limitedFontSize, + letterSpacing: 0.0, + fontWeight: FontWeight.w500, + useGoogleFonts: + GoogleFonts.asMap().containsKey('Nunito'), + ), ), ), - style: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: 'Nunito', - color: FlutterFlowTheme.of(context).info, - fontSize: 14.0, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), - ), ), ] .divide(const SizedBox(width: 20.0)) diff --git a/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart index a881894d..12c3fdc3 100644 --- a/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart +++ b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart @@ -50,12 +50,16 @@ class _MenuStaggeredViewComponentWidgetState extends State= 26 ? 1 : scaledFontSize >= 18 ? 2 : 3; + return Column( children: [ GridView.builder( physics: const NeverScrollableScrollPhysics(), - gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 3, + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: crossAxisCount, crossAxisSpacing: 10.0, mainAxisSpacing: 10.0, childAspectRatio: 1, diff --git a/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart b/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart index e4cdb519..0216eaff 100644 --- a/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart +++ b/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart @@ -3,6 +3,7 @@ import 'dart:collection'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; +import 'package:hub/shared/utils/limited_text_size.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; @@ -52,6 +53,8 @@ class _CardItemTemplateComponentWidgetState extends State _generateLabels() { + double limitedBodyTextSize = LimitedFontSizeUtil.getBodyFontSize(context); + return labelsLinkedHashMap.entries.map((entry) { final key = entry.key; final text = entry.value.toString(); @@ -68,6 +71,7 @@ class _CardItemTemplateComponentWidgetState extends State _generateStatus() { + double limitedBodyTextSize = LimitedFontSizeUtil.getBodyFontSize(context); return statusLinkedHashMap.expand((statusLinked) { return statusLinked.entries.map((entry) { final text = entry.key; final color = entry.value; - return Container( - padding: const EdgeInsets.all(5), - width: MediaQuery.of(context).size.width * 0.25, - decoration: BoxDecoration( - color: color, - borderRadius: BorderRadius.circular(5), - ), - child: Center( - child: Text( - text, - overflow: TextOverflow.ellipsis, - style: TextStyle( - color: FlutterFlowTheme.of(context).info, - fontSize: 12, - fontWeight: FontWeight.bold, + return Tooltip( + message: text, + child: Container( + padding: const EdgeInsets.all(5), + width: MediaQuery.of(context).size.width * 0.25, + decoration: BoxDecoration( + color: color, + borderRadius: BorderRadius.circular(5), + ), + child: Center( + child: Text( + text, + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: FlutterFlowTheme.of(context).info, + fontSize: limitedBodyTextSize, + fontWeight: FontWeight.bold, + ), ), ), ), diff --git a/lib/components/templates_components/details_component/details_component_widget.dart b/lib/components/templates_components/details_component/details_component_widget.dart index 01c05798..d32f069e 100644 --- a/lib/components/templates_components/details_component/details_component_widget.dart +++ b/lib/components/templates_components/details_component/details_component_widget.dart @@ -6,6 +6,8 @@ import 'package:google_fonts/google_fonts.dart'; import 'package:hub/components/templates_components/details_component/details_component_model.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; +import 'package:hub/shared/utils/limited_text_size.dart'; + class DetailsComponentWidget extends StatefulWidget { const DetailsComponentWidget({ @@ -58,7 +60,7 @@ class _DetailsComponentWidgetState extends State { @override Widget build(BuildContext context) { // CachedNetworkImage.evictFromCache(widget.imagePath ?? ''); - + final double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); return Container( constraints: BoxConstraints( maxWidth: MediaQuery.of(context).size.width, @@ -123,6 +125,7 @@ class _DetailsComponentWidgetState extends State { useGoogleFonts: GoogleFonts.asMap().containsKey( FlutterFlowTheme.of(context).labelMediumFamily, ), + fontSize: limitedBodyFontSize, ), hintStyle: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, @@ -131,6 +134,7 @@ class _DetailsComponentWidgetState extends State { useGoogleFonts: GoogleFonts.asMap().containsKey( FlutterFlowTheme.of(context).labelMediumFamily, ), + fontSize: limitedBodyFontSize, ), focusedBorder: InputBorder.none, errorBorder: InputBorder.none, @@ -147,6 +151,7 @@ class _DetailsComponentWidgetState extends State { useGoogleFonts: GoogleFonts.asMap().containsKey( FlutterFlowTheme.of(context).bodyMediumFamily, ), + fontSize: limitedBodyFontSize, ), textAlign: TextAlign.center, maxLines: null, @@ -170,6 +175,7 @@ class _DetailsComponentWidgetState extends State { return TextFormField( readOnly: true, initialValue: '$value', + style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, color: FlutterFlowTheme.of(context).primaryText, @@ -177,8 +183,11 @@ class _DetailsComponentWidgetState extends State { useGoogleFonts: GoogleFonts.asMap().containsKey( FlutterFlowTheme.of(context).bodyMediumFamily, ), + fontSize: limitedBodyFontSize, ), + decoration: InputDecoration( + labelText: key, filled: true, fillColor: FlutterFlowTheme.of(context).primaryBackground, @@ -195,9 +204,14 @@ class _DetailsComponentWidgetState extends State { useGoogleFonts: GoogleFonts.asMap().containsKey( FlutterFlowTheme.of(context).labelMediumFamily, ), + ), - hintStyle: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, + + hintStyle: FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey( 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 15e84c64..33008753 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 @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/shared/services/authentication/authentication_service.dart'; +import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/validator_util.dart'; import '/flutter_flow/flutter_flow_theme.dart'; @@ -48,223 +49,258 @@ class _ForgotPasswordTemplateComponentWidgetState extends State('BackButton'), - splashColor: Colors.transparent, - focusColor: Colors.transparent, - hoverColor: Colors.transparent, - highlightColor: Colors.transparent, - onTap: () async { - context.safePop(); - }, - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - const Padding( - padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0), - child: Icon( - Icons.arrow_back_rounded, - color: Color(0xFF15161E), - size: 24.0, - ), + decoration: BoxDecoration( + color: FlutterFlowTheme.of(context).primaryBackground, + borderRadius: const BorderRadius.only( + bottomLeft: Radius.circular(0.0), + bottomRight: Radius.circular(0.0), + topLeft: Radius.circular(15.0), + topRight: Radius.circular(15.0), + ), + ), + child: Padding( + padding: const EdgeInsets.fromLTRB(0, 25, 0, 25), + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (responsiveVisibility( + context: context, + phone: false, + tablet: false, + )) + Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 16.0, 0.0, 16.0, 8.0), + child: InkWell( + key: const ValueKey('BackButton'), + splashColor: Colors.transparent, + focusColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: Colors.transparent, + onTap: () async { + context.safePop(); + }, + child: Row( + mainAxisSize: MainAxisSize.max, + children: [ + const Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 0.0, 12.0, 0.0, 12.0), + child: Icon( + Icons.arrow_back_rounded, + color: Color(0xFF15161E), + size: 24.0, + ), + ), + Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 12.0, 0.0, 0.0, 0.0), + child: Text( + '', + 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'), + ), + ), + ), + ], ), - Padding( - padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0), - child: Text( - '', - style: FlutterFlowTheme.of(context).bodyMedium.override( - fontFamily: 'Plus Jakarta Sans', - color: const Color(0xFF15161E), - fontSize: 14.0, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), - ), + ), + ), + Padding( + padding: + const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0), + child: Text( + 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'), ), - ), - ], ), ), - ), - Padding( - padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0), - child: Text( - FFLocalizations.of(context).getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: 'Outfit', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 24.0, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'), - ), - ), - ), - Padding( - 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... */), - style: FlutterFlowTheme.of(context).labelMedium.override( - fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 14.0, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), - ), - ), - ), - Form( - key: _model.formKey, - autovalidateMode: AutovalidateMode.onUserInteraction, - child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0), - child: SizedBox( - width: double.infinity, - child: TextFormField( - key: const ValueKey('recoveryTextFormField'), - controller: _model.emailAddressTextController, - focusNode: _model.emailAddressFocusNode, - onChanged: (_) => EasyDebounce.debounce( - '_model.emailAddressTextController', - const Duration(milliseconds: 500), - () => setState(() {}), - ), - autofocus: true, - autofillHints: const [AutofillHints.email], - 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: 14.0, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), - ), - enabledBorder: OutlineInputBorder( - borderSide: const BorderSide( - color: Colors.black, - width: 2.00, - ), - borderRadius: BorderRadius.circular(12.0), - ), - focusedBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of(context).primary, - width: 2.00, - ), - borderRadius: BorderRadius.circular(12.0), - ), - errorBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, - width: 2.00, - ), - borderRadius: BorderRadius.circular(12.0), - ), - focusedErrorBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of(context).error, - width: 2.00, - ), - borderRadius: BorderRadius.circular(12.0), - ), - contentPadding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0), - suffixIcon: Icon( - Icons.email, - color: FlutterFlowTheme.of(context).primary, - size: 22.0, - ), - ), - style: FlutterFlowTheme.of(context).bodyMedium.override( + Padding( + 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... */), + style: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: 'Plus Jakarta Sans', color: FlutterFlowTheme.of(context).primaryText, - fontSize: 14.0, + fontSize: limitedSubHeaderFontSize, 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), ), ), - ), - ), - Align( - alignment: const AlignmentDirectional(0.0, 0.0), - child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0), - child: FFButtonWidget( - key: const ValueKey('SendButtonWidget'), - onPressed: (_model.emailAddressTextController.text == '' || - !ValidatorUtil.isValidEmail(_model.emailAddressTextController.text)) - ? null - : () async => - AuthenticationService.forgotPassword(context, _model.emailAddressTextController.text), - text: FFLocalizations.of(context).getText( - '74rnd5bu' /* Enviar */, - ), - 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), - color: FlutterFlowTheme.of(context).primary, - textStyle: FlutterFlowTheme.of(context).titleSmall.override( - fontFamily: 'Plus Jakarta Sans', - color: Colors.white, - fontSize: 16.0, - letterSpacing: 0.0, - fontWeight: FontWeight.w500, - useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), + Form( + key: _model.formKey, + autovalidateMode: AutovalidateMode.onUserInteraction, + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 16.0, 12.0, 16.0, 0.0), + child: SizedBox( + width: double.infinity, + child: TextFormField( + key: const ValueKey('recoveryTextFormField'), + controller: _model.emailAddressTextController, + focusNode: _model.emailAddressFocusNode, + onChanged: (_) => EasyDebounce.debounce( + '_model.emailAddressTextController', + const Duration(milliseconds: 500), + () => setState(() {}), ), - elevation: 3.0, - borderSide: const BorderSide( - color: Colors.transparent, - width: 1.0, + autofocus: true, + autofillHints: const [AutofillHints.email], + 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'), + ), + enabledBorder: OutlineInputBorder( + borderSide: const BorderSide( + color: Colors.black, + width: 2.00, + ), + borderRadius: BorderRadius.circular(12.0), + ), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context).primary, + width: 2.00, + ), + borderRadius: BorderRadius.circular(12.0), + ), + errorBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context).error, + width: 2.00, + ), + borderRadius: BorderRadius.circular(12.0), + ), + focusedErrorBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context).error, + width: 2.00, + ), + borderRadius: BorderRadius.circular(12.0), + ), + contentPadding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 24.0, 20.0, 24.0), + suffixIcon: Icon( + Icons.email, + color: FlutterFlowTheme.of(context).primary, + size: 22.0, + ), + ), + style: FlutterFlowTheme.of(context).bodyMedium.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'), + ), + maxLines: null, + keyboardType: TextInputType.emailAddress, + cursorColor: FlutterFlowTheme.of(context).primary, + validator: _model.emailAddressTextControllerValidator + .asValidator(context), + ), ), - disabledColor: FlutterFlowTheme.of(context).customColor5, - disabledTextColor: Colors.white, ), - showLoadingIndicator: true, ), - ), + Align( + alignment: const AlignmentDirectional(0.0, 0.0), + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 0.0, 24.0, 0.0, 0.0), + child: FFButtonWidget( + key: const ValueKey('SendButtonWidget'), + onPressed: (_model.emailAddressTextController.text == + '' || + !ValidatorUtil.isValidEmail( + _model.emailAddressTextController.text)) + ? null + : () async => AuthenticationService.forgotPassword( + context, _model.emailAddressTextController.text), + text: FFLocalizations.of(context).getText( + '74rnd5bu' /* Enviar */, + ), + 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), + 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'), + ), + elevation: 3.0, + borderSide: const BorderSide( + color: Colors.transparent, + width: 1.0, + ), + disabledColor: + FlutterFlowTheme.of(context).customColor5, + disabledTextColor: Colors.white, + ), + showLoadingIndicator: true, + ), + ), + ), + ], ), - ], + ), ), ), ); diff --git a/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart b/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart index 0afdecce..2262612b 100644 --- a/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart +++ b/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart @@ -3,6 +3,7 @@ import 'package:google_fonts/google_fonts.dart'; import 'package:hub/components/templates_components/message_notificaion_modal_template_component/message_notification_model.dart'; import 'package:hub/flutter_flow/flutter_flow_theme.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart'; +import 'package:hub/shared/utils/limited_text_size.dart'; class MessageNotificationModalTemplateComponentWidget extends StatefulWidget { const MessageNotificationModalTemplateComponentWidget({ @@ -57,6 +58,9 @@ class _MessageNotificationModalTemplateComponentWidgetState @override Widget build(BuildContext context) { + double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); + double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context); + return Container( width: MediaQuery.sizeOf(context).width, height: MediaQuery.sizeOf(context).height, @@ -94,12 +98,14 @@ class _MessageNotificationModalTemplateComponentWidgetState color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + fontSize: limitedBodyFontSize, ), hintStyle: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + fontSize: limitedBodyFontSize, ), enabledBorder: InputBorder.none, focusedBorder: InputBorder.none, @@ -115,6 +121,7 @@ class _MessageNotificationModalTemplateComponentWidgetState color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + fontSize: limitedBodyFontSize, ), textAlign: TextAlign.start, maxLines: null, @@ -145,6 +152,7 @@ class _MessageNotificationModalTemplateComponentWidgetState letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + fontSize: limitedBodyFontSize, ), hintStyle: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, @@ -152,6 +160,7 @@ class _MessageNotificationModalTemplateComponentWidgetState letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + fontSize: limitedBodyFontSize, ), enabledBorder: InputBorder.none, focusedBorder: InputBorder.none, @@ -197,12 +206,14 @@ class _MessageNotificationModalTemplateComponentWidgetState color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + fontSize: limitedBodyFontSize, ), hintStyle: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), + fontSize: limitedBodyFontSize, ), enabledBorder: InputBorder.none, focusedBorder: InputBorder.none, @@ -218,6 +229,7 @@ class _MessageNotificationModalTemplateComponentWidgetState color: FlutterFlowTheme.of(context).primaryText, letterSpacing: 0.0, useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), + fontSize: limitedBodyFontSize, ), textAlign: TextAlign.start, maxLines: null, diff --git a/lib/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart b/lib/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart index bc502c5d..c8c30d10 100644 --- a/lib/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart +++ b/lib/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart @@ -5,6 +5,7 @@ import 'package:flutter/services.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:hub/components/templates_components/provisional_schedule_template/provisional_schedule_template_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 '/backend/api_requests/api_calls.dart'; @@ -38,6 +39,11 @@ class _ScheduleProvisionalVisitPageWidgetState extends State FocusScope.of(context).unfocus(), child: SingleChildScrollView( @@ -63,9 +69,13 @@ class _ScheduleProvisionalVisitPageWidgetState extends State