Feat: Ajuste nos modais e as telas restantes.
This commit is contained in:
parent
a58f535d6d
commit
1caa0ccf0f
|
@ -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<CustomInputUtil> {
|
|||
|
||||
@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<CustomInputUtil> {
|
|||
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<CustomInputUtil> {
|
|||
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<CustomInputUtil> {
|
|||
),
|
||||
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,
|
||||
|
|
|
@ -5,6 +5,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 {
|
||||
|
@ -41,6 +42,9 @@ class _CustomSelectState extends State<CustomSelect> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0, 0.0, 0, 10.0),
|
||||
child: Column(
|
||||
|
@ -73,6 +77,7 @@ class _CustomSelectState extends State<CustomSelect> {
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintText: widget.hintText,
|
||||
icon: Icon(
|
||||
|
@ -123,6 +128,7 @@ class _CustomSelectState extends State<CustomSelect> {
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodySmallFamily),
|
||||
fontSize: limitedInputFontSize
|
||||
)),
|
||||
),
|
||||
],
|
||||
|
|
|
@ -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,155 +33,175 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
|||
|
||||
@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 = <FFUploadedFile>[];
|
||||
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 = <FFUploadedFile>[];
|
||||
|
||||
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<Color>(
|
||||
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),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,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 {
|
||||
|
@ -39,7 +40,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),
|
||||
|
|
|
@ -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;
|
||||
|
@ -85,6 +86,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
|
||||
Widget _buildCheckboxListTile(
|
||||
String key, List<Map<String, String>> options, double fontsize) {
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
return Column(
|
||||
children: [
|
||||
Row(
|
||||
|
@ -98,7 +100,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
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),
|
||||
|
@ -120,7 +122,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
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,
|
||||
|
@ -176,6 +178,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
Widget build(BuildContext context) {
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
|
||||
|
||||
return Center(
|
||||
child: Container(
|
||||
width: screenWidth - (screenWidth * 0.35),
|
||||
|
@ -203,7 +206,8 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.headlineMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 18.0,
|
||||
fontSize: LimitedFontSizeUtil.getHeaderFontSize(
|
||||
context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
|
@ -234,7 +238,15 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
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),
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -180,6 +180,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
|
||||
return Center(
|
||||
child: Container(
|
||||
|
@ -227,8 +228,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
_buildCheckboxListTile(
|
||||
'adresseeType', adresseeTypeOptions, LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14, 22, 10)),
|
||||
_buildCheckboxListTile('status', statusOptions, LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14, 22, 10)),
|
||||
'adresseeType', adresseeTypeOptions, limitedBodyFontSize),
|
||||
_buildCheckboxListTile('status', statusOptions, limitedBodyFontSize),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -240,7 +241,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
foregroundColor: FlutterFlowTheme.of(context).info,
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
child: Text(FFLocalizations.of(context).getText('88kshkph'), style: TextStyle(fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14, 22, 10))),
|
||||
child: Text(FFLocalizations.of(context).getText('88kshkph'), style: TextStyle(fontSize: limitedBodyFontSize)),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -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,6 +92,8 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
|||
super.dispose();
|
||||
}
|
||||
@override Widget build(BuildContext context) {
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
return InkWell(
|
||||
key: const ValueKey('ThrowExceptionWidget'),
|
||||
splashColor: Colors.transparent,
|
||||
|
@ -132,7 +135,7 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
|||
_getTitleByType(context),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: 20.0,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
|
@ -142,10 +145,13 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
|||
padding: const EdgeInsetsDirectional.fromSTEB(15.0, 10.0, 15.0, 0.0),
|
||||
child: Text(
|
||||
valueOrDefault<String>(widget.msg, 'Message Not Found'),
|
||||
overflow: TextOverflow.clip,
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -57,7 +57,7 @@ class _CardItemTemplateComponentWidgetState
|
|||
}
|
||||
|
||||
List<Widget> _generateLabels() {
|
||||
double limitedTextSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14, 24, 10);
|
||||
double limitedBodyTextSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
|
||||
return labelsLinkedHashMap.entries.map((entry) {
|
||||
final key = entry.key;
|
||||
|
@ -76,7 +76,7 @@ class _CardItemTemplateComponentWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedBodyTextSize,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
|
@ -86,7 +86,7 @@ class _CardItemTemplateComponentWidgetState
|
|||
overflow: TextOverflow.ellipsis,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedBodyTextSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
|
@ -124,6 +124,7 @@ class _CardItemTemplateComponentWidgetState
|
|||
}
|
||||
|
||||
List<Widget> _generateStatus() {
|
||||
double limitedBodyTextSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
return statusLinkedHashMap.expand((statusLinked) {
|
||||
return statusLinked.entries.map((entry) {
|
||||
final text = entry.key;
|
||||
|
@ -144,7 +145,7 @@ class _CardItemTemplateComponentWidgetState
|
|||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 12, 22, 10),
|
||||
fontSize: limitedBodyTextSize,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
|
|
|
@ -63,12 +63,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// CachedNetworkImage.evictFromCache(widget.imagePath ?? '');
|
||||
final double limitedFontSize = LimitedTextSizeUtil.getLimitedBodyFontSize(
|
||||
context,
|
||||
12.0,
|
||||
16.0,
|
||||
10.0,
|
||||
);
|
||||
final double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
return Container(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: MediaQuery.of(context).size.width,
|
||||
|
@ -140,7 +135,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
.labelMediumFamily,
|
||||
|
||||
),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
|
@ -153,7 +148,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
focusedBorder: InputBorder.none,
|
||||
errorBorder: InputBorder.none,
|
||||
|
@ -171,7 +166,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
|
@ -205,7 +200,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
|
||||
decoration: InputDecoration(
|
||||
|
|
|
@ -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';
|
||||
|
@ -50,6 +51,10 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: SingleChildScrollView(
|
||||
|
@ -113,7 +118,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: 14.0,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -134,7 +139,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Outfit',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 24.0,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
|
@ -151,7 +156,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
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()
|
||||
|
@ -187,7 +192,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
fontSize: 14.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -232,7 +237,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -276,7 +281,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
|
|
@ -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({
|
||||
|
@ -58,6 +59,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,
|
||||
|
@ -98,6 +102,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily:
|
||||
|
@ -106,6 +111,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
@ -122,6 +128,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
|
@ -155,6 +162,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
|
@ -165,6 +173,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
@ -217,6 +226,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily:
|
||||
|
@ -225,6 +235,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
@ -241,6 +252,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
|
|
|
@ -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';
|
||||
|
@ -40,6 +41,11 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
child: SingleChildScrollView(
|
||||
|
@ -62,18 +68,19 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 24.0, 0.0, 24.0),
|
||||
24.0, 24.0, 24.0, 24.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'uj8acuab' /* Preencha os Campos Abaixo: */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
overflow: TextOverflow.clip,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -115,6 +122,7 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -188,6 +196,7 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -229,6 +238,7 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -290,6 +300,7 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle:
|
||||
FlutterFlowTheme.of(context)
|
||||
|
@ -310,6 +321,8 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -376,6 +389,8 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
|
@ -441,6 +456,8 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
|
||||
),
|
||||
enabledBorder:
|
||||
OutlineInputBorder(
|
||||
|
@ -511,6 +528,8 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
validator: model
|
||||
|
@ -743,6 +762,7 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
model.notesTextController,
|
||||
focusNode:
|
||||
model.notesFocusNode,
|
||||
|
||||
autofocus: false,
|
||||
showCursor: true,
|
||||
cursorColor:
|
||||
|
@ -754,6 +774,19 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
counterStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
.bodyText1
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyText1Family,
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
labelText:
|
||||
FFLocalizations.of(
|
||||
context)
|
||||
|
@ -778,6 +811,7 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
|
@ -797,6 +831,7 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder:
|
||||
OutlineInputBorder(
|
||||
|
@ -877,6 +912,8 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 3,
|
||||
|
@ -960,8 +997,8 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
text: FFLocalizations.of(context)
|
||||
.getText('bv5fg9sv' /* Enviar */),
|
||||
options: FFButtonOptions(
|
||||
width: 150.0,
|
||||
height: 50.0,
|
||||
|
||||
height: 30.0 * MediaQuery.textScalerOf(context).scale(1),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
|
@ -977,7 +1014,9 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
|
|
|
@ -58,7 +58,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: LimitedTextSizeUtil.getScaledSizedBoxSize(context, 300, 570, 500, 300),
|
||||
height: 300 * MediaQuery.textScalerOf(context).scale(1),
|
||||
constraints: const BoxConstraints(
|
||||
minHeight: 300.0,
|
||||
maxWidth: 570.0,
|
||||
|
@ -117,7 +117,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 16, 30, 14),
|
||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 16, 16, 14),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -139,7 +139,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Outfit',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 20, 38, 18),
|
||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 20, 20, 18),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
||||
|
@ -156,7 +156,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14, 26, 12),
|
||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 14, 14, 12),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
|
@ -192,7 +192,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 10, 18, 8),
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -206,7 +206,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 10, 18, 8),
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -262,7 +262,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 10, 18, 8),
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -315,7 +315,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: LimitedTextSizeUtil.getNoResizeFont(context, 15),
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
|
|
@ -66,7 +66,7 @@ class RegisiterVistorTemplateComponentModel
|
|||
enText: 'This field is required',
|
||||
ptText: 'Este campo é obrigatório',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'package:easy_debounce/easy_debounce.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/components/atomic_components/shared_components_atoms/media_upload_button.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/shared/utils/image_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
|
@ -122,7 +123,9 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
double limitedTextSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 12.0, 22.0, 10.0 );
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
|
@ -150,11 +153,12 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
20.0, 0.0, 0.0, 15.0),
|
||||
24.0, 0.0, 24.0, 15.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'zazj5d8b' /* Preencha o formulário com os d... */,
|
||||
),
|
||||
overflow: TextOverflow.clip,
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily:
|
||||
|
@ -162,6 +166,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -197,7 +202,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
|
@ -207,7 +212,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -230,6 +235,10 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
),
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
|
@ -249,7 +258,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
onChanged: (value) {
|
||||
_model.debounce(() async {
|
||||
|
@ -298,7 +307,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
Colors.black
|
||||
.withOpacity(0.25),
|
||||
Colors.red),
|
||||
fontSize: 13.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
)),
|
||||
),
|
||||
|
@ -337,7 +346,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
|
@ -348,7 +357,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -371,6 +380,10 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
),
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
|
@ -390,7 +403,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
maxLines: null,
|
||||
maxLength: 80,
|
||||
|
@ -430,7 +443,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Visitor Type',
|
||||
|
@ -478,7 +491,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodySmallFamily),
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
)),
|
||||
),
|
||||
],
|
||||
|
@ -519,156 +532,17 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
} else {
|
||||
return Stack(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
|
||||
final selectedMedia =
|
||||
await selectMediaWithSourceBottomSheetandFaceDetection(
|
||||
context: context,
|
||||
// maxWidth: 300.00,
|
||||
// maxHeight: 300.00,
|
||||
imageQuality: 100,
|
||||
allowPhoto: true,
|
||||
includeDimensions: true,
|
||||
);
|
||||
if (selectedMedia != null) {
|
||||
// &&
|
||||
// selectedMedia.every((m) =>
|
||||
// validateFileFormat(
|
||||
// m.storagePath, context))) {
|
||||
setState(
|
||||
() => _model.isDataUploading = true);
|
||||
var selectedUploadedFiles =
|
||||
<FFUploadedFile>[];
|
||||
|
||||
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();
|
||||
_model.isDataUploading = false;
|
||||
}
|
||||
if (selectedUploadedFiles.length ==
|
||||
selectedMedia.length) {
|
||||
setState(() {
|
||||
_model.uploadedLocalFile =
|
||||
selectedUploadedFiles.first;
|
||||
_isLoading = false;
|
||||
});
|
||||
final String message =
|
||||
FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
enText: 'File uploaded successfully',
|
||||
ptText: 'Arquivo enviado com sucesso',
|
||||
);
|
||||
showUploadMessage(context, message);
|
||||
} else {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
final String message =
|
||||
FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
enText: 'Failed to upload data',
|
||||
ptText: 'Falha ao enviar os 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<Color>(
|
||||
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: limitedTextSize,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
MediaUploadButtonUtil(
|
||||
onUploadComplete: (uploadedFile) {
|
||||
setState(() {
|
||||
_model.uploadedLocalFile = uploadedFile;
|
||||
});
|
||||
},
|
||||
isUploading: _model.isDataUploading,
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
'p4ftwxcy' /* Selecione uma foto */,
|
||||
),
|
||||
uploadedFiles: _model.uploadedLocalFile,
|
||||
),
|
||||
]
|
||||
);
|
||||
|
@ -692,6 +566,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -730,7 +605,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
|
@ -741,7 +616,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -783,7 +658,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
// validator:
|
||||
// _model.textController3Validator.asValidator(context),
|
||||
|
@ -820,7 +695,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
|
@ -831,7 +706,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -873,7 +748,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
||||
|
@ -976,8 +851,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
'okbw0aiu' /* Cadastrar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: 250.0,
|
||||
height: 36.0,
|
||||
height: 30.0 * MediaQuery.textScalerOf(context).scale(1),
|
||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
80.0, 0.0, 80.0, 0.0),
|
||||
|
@ -993,7 +867,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
fontSize: LimitedTextSizeUtil.getNoResizeFont(context, 15)
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
|
|
|
@ -5,6 +5,7 @@ import 'package:google_fonts/google_fonts.dart';
|
|||
import 'package:hub/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart';
|
||||
import 'package:hub/shared/components/atoms/atom_terms_of_use.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/validator_util.dart';
|
||||
|
||||
|
@ -109,6 +110,9 @@ class _SignInTemplateComponentWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
|
@ -123,30 +127,28 @@ class _SignInTemplateComponentWidgetState
|
|||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(3.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'VAMOS LÁ! ENTRE COM A SUA CONTA',
|
||||
enText: 'LET\'S GO! SIGN IN WITH YOUR ACCOUNT',
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.displaySmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 24.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(3.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'VAMOS LÁ! ENTRE COM A SUA CONTA',
|
||||
enText: 'LET\'S GO! SIGN IN WITH YOUR ACCOUNT',
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.displaySmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -243,7 +245,7 @@ class _SignInTemplateComponentWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
|
@ -287,10 +289,19 @@ class _SignInTemplateComponentWidgetState
|
|||
.error,
|
||||
width: 0.25,
|
||||
),
|
||||
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
fontSize: limitedInputFontSize,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -321,7 +332,7 @@ class _SignInTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
|
@ -383,7 +394,7 @@ class _SignInTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
|
@ -404,6 +415,14 @@ class _SignInTemplateComponentWidgetState
|
|||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
fontSize: limitedInputFontSize,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide:
|
||||
const BorderSide(
|
||||
|
@ -469,7 +488,7 @@ class _SignInTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
|
@ -548,7 +567,7 @@ class _SignInTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.info,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
|
@ -616,7 +635,7 @@ class _SignInTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.secondaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
|
@ -717,8 +736,7 @@ class _SignInTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.info,
|
||||
fontSize:
|
||||
16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
fontWeight:
|
||||
|
@ -867,7 +885,10 @@ class _SignInTemplateComponentWidgetState
|
|||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText),
|
||||
.primaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
|
||||
),
|
||||
TextSpan(
|
||||
text: FFLocalizations.of(
|
||||
|
@ -883,7 +904,7 @@ class _SignInTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primary,
|
||||
fontSize: 14.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.normal,
|
||||
|
@ -910,7 +931,9 @@ class _SignInTemplateComponentWidgetState
|
|||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily)),
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:flutter_animate/flutter_animate.dart';
|
|||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart';
|
||||
import 'package:hub/shared/components/atoms/atom_terms_of_use.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:hub/shared/utils/storage_util.dart';
|
||||
import 'package:hub/shared/utils/validator_util.dart';
|
||||
|
||||
|
@ -101,6 +102,9 @@ class _SignUpTemplateComponentWidgetState
|
|||
final double screenWidth = mediaQuery.size.width;
|
||||
final double screenHeight = mediaQuery.size.height;
|
||||
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
|
||||
bool isFormInvalid() {
|
||||
if (_model.nameRegisterFormTextController.text == '' ||
|
||||
_model.emailRegisterFormTextController.text == '' ||
|
||||
|
@ -142,29 +146,27 @@ class _SignUpTemplateComponentWidgetState
|
|||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.displaySmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: screenWidth * 0.06,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.displaySmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -258,7 +260,7 @@ class _SignUpTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
|
@ -307,6 +309,17 @@ class _SignUpTemplateComponentWidgetState
|
|||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
fontSize: limitedInputFontSize,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontStyle: FontStyle.normal,
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -344,7 +357,7 @@ class _SignUpTemplateComponentWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
|
@ -402,7 +415,7 @@ class _SignUpTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
|
@ -451,6 +464,17 @@ class _SignUpTemplateComponentWidgetState
|
|||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
fontSize: limitedInputFontSize,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontStyle: FontStyle.normal,
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -488,7 +512,7 @@ class _SignUpTemplateComponentWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.customColor1,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
|
@ -549,7 +573,7 @@ class _SignUpTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
|
@ -596,6 +620,17 @@ class _SignUpTemplateComponentWidgetState
|
|||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
fontSize: limitedInputFontSize,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontStyle: FontStyle.normal,
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide:
|
||||
|
@ -649,7 +684,7 @@ class _SignUpTemplateComponentWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
|
@ -730,7 +765,7 @@ class _SignUpTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.secondaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
|
@ -783,6 +818,7 @@ class _SignUpTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
|
@ -801,7 +837,7 @@ class _SignUpTemplateComponentWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primary,
|
||||
fontSize: 14.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
|
|
|
@ -60,18 +60,9 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final double limitedFontSize = LimitedTextSizeUtil.getLimitedBodyFontSize(
|
||||
context,
|
||||
12,
|
||||
16,
|
||||
10
|
||||
);
|
||||
final double limitedHeaderFontSize = LimitedTextSizeUtil.getLimitedBodyFontSize(
|
||||
context,
|
||||
14,
|
||||
16,
|
||||
12
|
||||
);
|
||||
final double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
final double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
final double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
||||
|
@ -124,7 +115,7 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -186,7 +177,7 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
keyboardType:
|
||||
const TextInputType.numberWithOptions(signed: true),
|
||||
|
@ -330,7 +321,7 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyLargeFamily),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -416,7 +407,7 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_animate/flutter_animate.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
|
||||
import '/flutter_flow/flutter_flow_animations.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
|
@ -89,6 +90,10 @@ class _WelcomeTemplateComponentWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: SingleChildScrollView(
|
||||
|
@ -108,7 +113,7 @@ class _WelcomeTemplateComponentWidgetState
|
|||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
fontSize: 24.0,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -124,7 +129,7 @@ class _WelcomeTemplateComponentWidgetState
|
|||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 15.0,
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -215,7 +220,7 @@ class _WelcomeTemplateComponentWidgetState
|
|||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.info,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
|
@ -266,13 +271,14 @@ class _WelcomeTemplateComponentWidgetState
|
|||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
|
|
|
@ -566,18 +566,19 @@ void showSnackbar(
|
|||
|
||||
void showAlertDialog(BuildContext context, String title, String content,
|
||||
Future<void> Function() action) {
|
||||
double limitedTextSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14, 20, 12);
|
||||
double limitedHeaderSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 20, 28, 18);
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
title: Text(title, style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedHeaderSize), textAlign: TextAlign.center),
|
||||
title: Text(title, style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedHeaderFontSize), textAlign: TextAlign.center),
|
||||
content: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(content, style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedTextSize)),
|
||||
child: Text(content, style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedBodyFontSize)),
|
||||
),
|
||||
actions: [
|
||||
Row(
|
||||
|
@ -592,7 +593,7 @@ void showAlertDialog(BuildContext context, String title, String content,
|
|||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedTextSize
|
||||
fontSize: limitedInputFontSize
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
|
@ -618,7 +619,7 @@ void showAlertDialog(BuildContext context, String title, String content,
|
|||
elevation: 0,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedTextSize
|
||||
fontSize: limitedInputFontSize
|
||||
),
|
||||
splashColor: const Color.fromARGB(255, 129, 129, 129),
|
||||
borderSide: BorderSide(
|
||||
|
|
|
@ -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/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';
|
||||
|
||||
class MessageHistoryPageWidget extends StatefulWidget {
|
||||
|
@ -166,7 +167,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget>
|
|||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 15.0,
|
||||
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||
fontWeight: FontWeight.bold,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||
|
@ -178,6 +179,8 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget>
|
|||
}
|
||||
|
||||
Widget _body(BuildContext context) {
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
return SafeArea(
|
||||
top: true,
|
||||
child: Column(
|
||||
|
@ -191,7 +194,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget>
|
|||
unselectedLabelColor: FlutterFlowTheme.of(context).primaryText,
|
||||
labelStyle: FlutterFlowTheme.of(context).titleMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).titleMediumFamily,
|
||||
fontSize: 13.0,
|
||||
fontSize: limitedBodyFontSize,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).titleMediumFamily),
|
||||
|
@ -231,7 +234,11 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget>
|
|||
Center(
|
||||
child: Text(FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Nenhuma mensagem encontrada!",
|
||||
enText: "No message found")),
|
||||
enText: "No message found"),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedSubHeaderFontSize,)
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -283,6 +290,8 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget>
|
|||
}
|
||||
|
||||
Widget _item(BuildContext context, dynamic jsonBody) {
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
child: Card(
|
||||
|
@ -317,7 +326,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget>
|
|||
jsonBody['MSG_ORIGEM_DESC'].toString(),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 15,
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
overflow: TextOverflow.fade,
|
||||
|
@ -343,7 +352,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget>
|
|||
jsonBody['MSG_DATE'].toString(),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 10,
|
||||
fontSize: limitedBodyFontSize,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).customColor6,
|
||||
),
|
||||
|
@ -368,6 +377,11 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget>
|
|||
Expanded(
|
||||
child: Text(
|
||||
jsonBody['MSG_TEXTO'].toString(),
|
||||
style: TextStyle(
|
||||
fontSize: limitedBodyFontSize,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).customColor6,
|
||||
),
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(width: 15)),
|
||||
|
|
|
@ -268,8 +268,7 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
|||
enText: "No orders found!"),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(
|
||||
context, 14, 24, 12),
|
||||
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||
),
|
||||
)),
|
||||
],
|
||||
|
|
|
@ -5,6 +5,7 @@ import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
|||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
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/storage_util.dart';
|
||||
|
||||
|
@ -116,6 +117,9 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen>
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double limitedBodyTextSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedHeaderTextSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
|
@ -129,7 +133,11 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen>
|
|||
Center(
|
||||
child: Text(FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Nenhum Pet encontrado!",
|
||||
enText: "No pets found")),
|
||||
enText: "No pets found"),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Nunito',
|
||||
fontSize: limitedHeaderTextSize,)
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -155,6 +163,10 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen>
|
|||
ptText: "Ilimitado", enText: "Unlimited")
|
||||
: "${FFLocalizations.of(context).getVariableText(ptText: "Quantidade de Pets: ", enText: "Amount of Pets: ")}$count/${widget.model.petAmountRegister}",
|
||||
textAlign: TextAlign.right,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Nunito',
|
||||
fontSize: limitedBodyTextSize,
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
|
|
|
@ -14,6 +14,7 @@ import 'package:hub/flutter_flow/nav/nav.dart';
|
|||
import 'package:hub/pages/pets_page/pets_page_widget.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/shared/utils/image_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:hub/shared/utils/storage_util.dart';
|
||||
import 'package:hub/shared/utils/validator_util.dart';
|
||||
|
||||
|
@ -408,13 +409,15 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
// model.safeSetState!();
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 130,
|
||||
width: 100,
|
||||
height: 40,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
elevation: 0,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 15),
|
||||
),
|
||||
splashColor: const Color.fromARGB(95, 0, 146, 5),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
width: 1,
|
||||
|
@ -484,13 +487,15 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
});
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 130,
|
||||
width: 100,
|
||||
height: 40,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
elevation: 0,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 15),
|
||||
),
|
||||
splashColor: const Color.fromARGB(131, 255, 17, 0),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
width: 1,
|
||||
|
|
|
@ -13,6 +13,7 @@ import 'package:hub/flutter_flow/form_field_controller.dart';
|
|||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/pages/pets_page/pets_history_screen.dart';
|
||||
import 'package:hub/pages/pets_page/pets_page_model.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
|
@ -107,6 +108,10 @@ class _PetsPageWidgetState extends State<PetsPageWidget>
|
|||
}
|
||||
|
||||
Widget _buildRegisterForm(BuildContext context) {
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
|
@ -126,7 +131,9 @@ class _PetsPageWidgetState extends State<PetsPageWidget>
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedHeaderFontSize,
|
||||
),
|
||||
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -177,41 +184,35 @@ class _PetsPageWidgetState extends State<PetsPageWidget>
|
|||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 80,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||
child: CustomInputUtil(
|
||||
controller: _model.textControllerRace,
|
||||
validator: _model.textControllerRaceValidator
|
||||
.asValidator(context),
|
||||
focusNode: _model.textFieldFocusRace,
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Raça', enText: 'Race'),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Ex: Labrador, Poodle, Siamês, Persa',
|
||||
enText: 'e.g. Labrador, Poodle, Siamese, Persian'),
|
||||
suffixIcon: Icons.pets_outlined,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 80,
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerRace,
|
||||
validator: _model.textControllerRaceValidator
|
||||
.asValidator(context),
|
||||
focusNode: _model.textFieldFocusRace,
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Raça', enText: 'Race'),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Ex: Labrador, Poodle, Siamês, Persa',
|
||||
enText: 'e.g. Labrador, Poodle, Siamese, Persian'),
|
||||
suffixIcon: Icons.pets_outlined,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 80,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||
child: CustomInputUtil(
|
||||
controller: _model.textControllerColor,
|
||||
validator: _model.textControllerColorValidator
|
||||
.asValidator(context),
|
||||
focusNode: _model.textFieldFocusColor,
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Cor', enText: 'Color'),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Ex: Preto, Amarelo, Branco',
|
||||
enText: 'e.g. Black, Yellow, White'),
|
||||
suffixIcon: Symbols.palette,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 80,
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerColor,
|
||||
validator: _model.textControllerColorValidator
|
||||
.asValidator(context),
|
||||
focusNode: _model.textFieldFocusColor,
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Cor', enText: 'Color'),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Ex: Preto, Amarelo, Branco',
|
||||
enText: 'e.g. Black, Yellow, White'),
|
||||
suffixIcon: Symbols.palette,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 80,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||
|
@ -251,6 +252,7 @@ class _PetsPageWidgetState extends State<PetsPageWidget>
|
|||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintText: FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
|
@ -271,6 +273,7 @@ class _PetsPageWidgetState extends State<PetsPageWidget>
|
|||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
lineHeight: 1.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -326,6 +329,7 @@ class _PetsPageWidgetState extends State<PetsPageWidget>
|
|||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
lineHeight: 1.8,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
validator: _model
|
||||
|
@ -364,7 +368,7 @@ class _PetsPageWidgetState extends State<PetsPageWidget>
|
|||
fontFamily: FlutterFlowTheme
|
||||
.of(context)
|
||||
.headlineLargeFamily,
|
||||
fontSize: 32.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
|
@ -456,6 +460,7 @@ class _PetsPageWidgetState extends State<PetsPageWidget>
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -479,8 +484,9 @@ class _PetsPageWidgetState extends State<PetsPageWidget>
|
|||
ptText: 'Fêmea', enText: 'Female')
|
||||
],
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Selecione o gênero do Pet',
|
||||
enText: 'Select the gender of the Pet')),
|
||||
ptText: 'Gênero do Pet',
|
||||
enText: 'Gender of the Pet')
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||
|
@ -507,8 +513,8 @@ class _PetsPageWidgetState extends State<PetsPageWidget>
|
|||
ptText: 'Gigante', enText: 'Giant'),
|
||||
],
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Selecione o porte do Pet',
|
||||
enText: 'Select the size of the Pet')),
|
||||
ptText: 'Porte do Pet',
|
||||
enText: 'Size of the Pet')),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
|
@ -533,6 +539,7 @@ class _PetsPageWidgetState extends State<PetsPageWidget>
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -5,6 +5,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/preferences_settings_page/preferences_settings_model.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:hub/shared/utils/storage_util.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
|
@ -20,6 +21,7 @@ class _PreferencesPageWidgetState extends State<PreferencesPageWidget> {
|
|||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -215,7 +217,7 @@ class _PreferencesPageWidgetState extends State<PreferencesPageWidget> {
|
|||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.normal,
|
||||
fontStyle: FontStyle.normal,
|
||||
|
|
|
@ -110,257 +110,272 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget>
|
|||
screenWidth < screenHeight ? screenWidth : screenHeight;
|
||||
double dimension = smallerDimension * 0.75;
|
||||
double totalTimeInSeconds = 100.0;
|
||||
double limitedHeaderTextSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 20.0, 38, 18);
|
||||
double limitedBodyTextSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14.0, 22, 12);
|
||||
double limitedHeaderTextSize = LimitedFontSizeUtil.getCalculateFontSize(context, 18, 18, 16);
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
|
||||
return SafeArea(
|
||||
// top: true,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
if (_model.isAccess == true && _model.key != null)
|
||||
Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Use esse QR Code para acesso',
|
||||
enText: 'Use this QR Code for access',
|
||||
),
|
||||
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),
|
||||
|
||||
),
|
||||
),
|
||||
Stack(
|
||||
child: Center(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
if (_model.isAccess == true && _model.key != null)
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
safeSetState(() async {
|
||||
_resetAnimationAndToggleAccess();
|
||||
});
|
||||
|
||||
_model.isFingerprint
|
||||
? await _showBiometricsAuth(context)
|
||||
: await _showQrCodeBottomSheet(context);
|
||||
},
|
||||
child: _model.buildQrCode(
|
||||
dimension: dimension,
|
||||
errorCorrectLevel: QrErrorCorrectLevel.M,
|
||||
identifier: _model.userDevUUID,
|
||||
pass: _model.key!,
|
||||
direction: 5,
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0 , 20),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Use esse QR Code para acesso',
|
||||
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),
|
||||
|
||||
),
|
||||
),
|
||||
),
|
||||
if (_model.isAccess == false && _model.key == null)
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0, 0),
|
||||
child: BarcodeWidget(
|
||||
data: 'Barcode',
|
||||
barcode: Barcode.qrCode(),
|
||||
width: 300.0,
|
||||
height: 200.0,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
backgroundColor: Colors.transparent,
|
||||
errorBuilder: (context, error) => const SizedBox(
|
||||
width: 300.0,
|
||||
height: 200.0,
|
||||
Stack(
|
||||
children: [
|
||||
if (_model.isAccess == true && _model.key != null)
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
safeSetState(() async {
|
||||
_resetAnimationAndToggleAccess();
|
||||
});
|
||||
|
||||
_model.isFingerprint
|
||||
? await _showBiometricsAuth(context)
|
||||
: await _showQrCodeBottomSheet(context);
|
||||
},
|
||||
child: _model.buildQrCode(
|
||||
dimension: dimension,
|
||||
errorCorrectLevel: QrErrorCorrectLevel.M,
|
||||
identifier: _model.userDevUUID,
|
||||
pass: _model.key!,
|
||||
direction: 5,
|
||||
),
|
||||
),
|
||||
),
|
||||
drawText: false,
|
||||
).animateOnActionTrigger(
|
||||
animationsMap['barcodeOnActionTriggerAnimation']!,
|
||||
),
|
||||
),
|
||||
if (_model.isAccess == false && _model.key == null)
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onLongPress: () async {
|
||||
await _model.qrCodeEncoder(
|
||||
context,
|
||||
key: _model.key,
|
||||
);
|
||||
setState(() {});
|
||||
},
|
||||
child: Container(
|
||||
width: 200.0,
|
||||
height: 200.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
_model.isFingerprint
|
||||
? await _showBiometricsAuth(context)
|
||||
: await _showQrCodeBottomSheet(context);
|
||||
},
|
||||
text: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Gerar QR Code',
|
||||
enText: 'Generate QR Code',
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
height: 40.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.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: FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily,
|
||||
color: Colors.white,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily),
|
||||
fontSize: LimitedTextSizeUtil.getNoResizeFont(context, 14),
|
||||
if (_model.isAccess == false && _model.key == null)
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0, 0),
|
||||
child: BarcodeWidget(
|
||||
data: 'Barcode',
|
||||
barcode: Barcode.qrCode(),
|
||||
width: 300.0,
|
||||
height: 200.0,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
backgroundColor: Colors.transparent,
|
||||
errorBuilder: (context, error) => const SizedBox(
|
||||
width: 300.0,
|
||||
height: 200.0,
|
||||
),
|
||||
drawText: false,
|
||||
).animateOnActionTrigger(
|
||||
animationsMap['barcodeOnActionTriggerAnimation']!,
|
||||
),
|
||||
),
|
||||
if (_model.isAccess == false && _model.key == null)
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onLongPress: () async {
|
||||
await _model.qrCodeEncoder(
|
||||
context,
|
||||
key: _model.key,
|
||||
);
|
||||
setState(() {});
|
||||
},
|
||||
child: Container(
|
||||
width: 200.0,
|
||||
height: 200.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
_model.isFingerprint
|
||||
? await _showBiometricsAuth(context)
|
||||
: await _showQrCodeBottomSheet(context);
|
||||
},
|
||||
text: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Gerar QR Code',
|
||||
enText: 'Generate QR Code',
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
height: 40.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.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: FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily,
|
||||
color: Colors.white,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily),
|
||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 12, 12, 10),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (_model.isAccess == true && _model.key != null)
|
||||
Container(
|
||||
width: 300.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Visibility(
|
||||
visible: _model.isAccess == true,
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText:
|
||||
'Certifique-se de que o QRCode está visivel para o leitor',
|
||||
enText: 'Make sure the QRCode is visible to the reader',
|
||||
// '6z6kvmhl' /* Certifique-se de que o QRCode ... */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyTextSize,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (_model.isAccess == true && _model.key != null)
|
||||
Container(
|
||||
width: 250.0,
|
||||
height: 80.0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
10.0, 0.0, 0.0, 0.0),
|
||||
if (_model.isAccess == true && _model.key != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 20, 0, 0),
|
||||
child: Container(
|
||||
width: 300.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Visibility(
|
||||
visible: _model.isAccess == true,
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Expirando QR code em',
|
||||
enText: 'Expiring QR code in',
|
||||
// 'wkjkxd2e' /* Trocando QR code em */,
|
||||
ptText:
|
||||
'Certifique-se de que o QRCode está visivel para o leitor',
|
||||
enText: 'Make sure the QRCode is visible to the reader',
|
||||
// '6z6kvmhl' /* Certifique-se de que o QRCode ... */,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedBodyTextSize,
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 20.0, 0.0),
|
||||
child: StreamBuilder<double>(
|
||||
stream: getProgressValue(),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.waiting) {
|
||||
return const CircularProgressIndicator();
|
||||
} else if (snapshot.hasError) {
|
||||
return Text('Error: ${snapshot.error}');
|
||||
} else if (!snapshot.hasData) {
|
||||
return const Text('No data');
|
||||
} else {
|
||||
final progress = snapshot.data!;
|
||||
return CircularPercentIndicator(
|
||||
percent: progress,
|
||||
restartAnimation: true,
|
||||
reverse: false,
|
||||
radius: 30.0,
|
||||
lineWidth: 7.0,
|
||||
animation: true,
|
||||
animateFromLastPercent: true,
|
||||
onAnimationEnd: () {
|
||||
_resetAnimationAndToggleAccess();
|
||||
},
|
||||
progressColor:
|
||||
FlutterFlowTheme.of(context).primary,
|
||||
backgroundColor:
|
||||
FlutterFlowTheme.of(context).primaryText,
|
||||
center: Text(
|
||||
'${(progress * totalTimeInSeconds / 5).toStringAsFixed(1)}s',
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.headlineSmall
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.headlineSmallFamily,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.headlineSmallFamily),
|
||||
),
|
||||
),
|
||||
startAngle: 20.0,
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
if (_model.isAccess == true && _model.key != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 20, 0, 20),
|
||||
child: Container(
|
||||
width: 250.0,
|
||||
height: 80.0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
10.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Expirando QR code em',
|
||||
enText: 'Expiring QR code in',
|
||||
// 'wkjkxd2e' /* Trocando QR code em */,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 20.0, 0.0),
|
||||
child: StreamBuilder<double>(
|
||||
stream: getProgressValue(),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.waiting) {
|
||||
return const CircularProgressIndicator();
|
||||
} else if (snapshot.hasError) {
|
||||
return Text('Error: ${snapshot.error}');
|
||||
} else if (!snapshot.hasData) {
|
||||
return const Text('No data');
|
||||
} else {
|
||||
final progress = snapshot.data!;
|
||||
return CircularPercentIndicator(
|
||||
percent: progress,
|
||||
restartAnimation: true,
|
||||
reverse: false,
|
||||
radius: 30.0,
|
||||
lineWidth: 7.0,
|
||||
animation: true,
|
||||
animateFromLastPercent: true,
|
||||
onAnimationEnd: () {
|
||||
_resetAnimationAndToggleAccess();
|
||||
},
|
||||
progressColor:
|
||||
FlutterFlowTheme.of(context).primary,
|
||||
backgroundColor:
|
||||
FlutterFlowTheme.of(context).primaryText,
|
||||
center: Text(
|
||||
'${(progress * totalTimeInSeconds / 5).toStringAsFixed(1)}s',
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.headlineSmall
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.headlineSmallFamily,
|
||||
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.headlineSmallFamily),
|
||||
),
|
||||
),
|
||||
startAngle: 20.0,
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
|||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/pages/reception_page/reception_page_model.dart';
|
||||
import 'package:hub/shared/services/localization/localization_service.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:hub/shared/utils/storage_util.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
|
@ -52,6 +53,10 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
|
||||
StorageUtil().context = context;
|
||||
return ChangeNotifierProvider(
|
||||
create: (context) => ReceptionPageModel(),
|
||||
|
@ -66,7 +71,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(45, 0, 45, 15.0),
|
||||
padding: const EdgeInsets.fromLTRB(45, 20, 45, 15.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText:
|
||||
|
@ -79,7 +84,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
fontSize: 20.0,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w700,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -90,7 +95,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
const AtomImageSvgTheme(
|
||||
filename: 'reception', width: 180, height: 180),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(70, 30, 70.0, 60),
|
||||
padding: const EdgeInsets.fromLTRB(70, 30, 70.0, 40),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText:
|
||||
|
@ -103,7 +108,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
.override(
|
||||
fontFamily: 'Nunito Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
fontSize: limitedBodyFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -128,7 +133,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
fontFamily: 'Nunito Sans',
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.secondaryText,
|
||||
fontSize: 10.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -142,7 +147,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
enText: 'My Identifier'),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
height:30,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
|
@ -155,7 +160,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
fontFamily: 'Nunito Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(context).info,
|
||||
fontSize: 14.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -173,7 +178,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(60, 0, 60, 0),
|
||||
padding: const EdgeInsets.fromLTRB(60, 0, 60, 25),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
PhpGroup.unregisterDevice();
|
||||
|
@ -196,7 +201,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
ptText: 'Sair da Conta', enText: 'Logout'),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
height: 30,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
|
@ -210,7 +215,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
fontFamily: 'Nunito Sans',
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
fontSize: 14.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
|
|
@ -506,7 +506,7 @@ class ScheduleCompleteVisitPageModel
|
|||
elevation: 0,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedTextSizeUtil.getNoResizeFont(context, 14),
|
||||
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
|
@ -542,7 +542,7 @@ class ScheduleCompleteVisitPageModel
|
|||
elevation: 0,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedTextSizeUtil.getNoResizeFont(context, 14),
|
||||
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
|
@ -578,7 +578,7 @@ URL do Convite: https://visita.freaccess.com.br/${item['VAW_ID']}/$cliUUID/${ite
|
|||
elevation: 0,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedTextSizeUtil.getNoResizeFont(context, 14),
|
||||
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
|
|
|
@ -147,7 +147,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 15.0,
|
||||
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||
|
@ -171,8 +171,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
unselectedLabelColor: FlutterFlowTheme.of(context).primaryText,
|
||||
labelStyle: FlutterFlowTheme.of(context).titleMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).titleMediumFamily,
|
||||
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(
|
||||
context, 12.0, 16.0, 10.0),
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).titleMediumFamily),
|
||||
|
@ -224,8 +223,9 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double baseFontSize = 12.0;
|
||||
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
||||
final double limitedFontSize = LimitedTextSizeUtil.getLimitedBodyFontSize(
|
||||
context, 12, 12, 10.0);
|
||||
final double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
final double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
final double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
final double scaledSizedBoxSize = scaledFontSize > 16.0 ? 100 : 80;
|
||||
|
||||
return SingleChildScrollView(
|
||||
|
@ -257,6 +257,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -293,7 +294,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintText:
|
||||
FFLocalizations.of(context).getText(
|
||||
|
@ -313,7 +314,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
lineHeight: 1.0,
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -339,6 +340,12 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
|
@ -364,7 +371,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
lineHeight: 1.8,
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
validator: model.textController1Validator
|
||||
|
@ -552,7 +559,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'xpgc5e8d',
|
||||
|
@ -570,7 +577,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
lineHeight: 1.0,
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -580,6 +587,12 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
|
@ -618,7 +631,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
lineHeight: 1.8,
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
validator: model.textController2Validator
|
||||
|
@ -654,7 +667,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.headlineLargeFamily,
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts
|
||||
|
@ -800,6 +813,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -996,7 +1010,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
.titleSmallFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
|
@ -1037,6 +1051,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1106,7 +1121,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintText:
|
||||
FFLocalizations.of(context).getVariableText(enText: 'Reason for Visit', ptText: 'Motivo da Visita'
|
||||
|
@ -1157,7 +1172,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.customColor6,
|
||||
fontSize: limitedFontSize)),
|
||||
fontSize: limitedInputFontSize)),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -1226,7 +1241,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintText:
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
|
@ -1280,7 +1295,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.customColor6,
|
||||
fontSize: limitedFontSize)),
|
||||
fontSize: limitedInputFontSize)),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -1312,6 +1327,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1340,7 +1356,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1414,6 +1430,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1446,7 +1463,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'w18iztdm',
|
||||
|
@ -1462,7 +1479,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -1507,7 +1524,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
|
@ -1687,13 +1704,13 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
}
|
||||
: null,
|
||||
options: FFButtonOptions(
|
||||
height: 40,
|
||||
height: 30 * MediaQuery.textScalerOf(context).scale(1),
|
||||
width: MediaQuery.of(context).size.width * 0.5,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).subtitle2.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
fontSize: 18.0 / MediaQuery.textScalerOf(context).scale(1),
|
||||
fontSize: limitedInputFontSize,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
borderRadius: const BorderRadius.only(
|
||||
|
|
|
@ -129,7 +129,7 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget>
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
double limitedTextSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14, 24, 12);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
|
@ -147,7 +147,7 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget>
|
|||
enText: "No visit found"),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedTextSize,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
fontWeight: FontWeight.bold
|
||||
)
|
||||
),
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
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';
|
||||
|
@ -24,7 +25,8 @@ class AtomTermsOfUse extends StatelessWidget {
|
|||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: 14.0,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(
|
||||
context),
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
|
|
|
@ -28,7 +28,6 @@ class DialogUtil {
|
|||
context: context,
|
||||
builder: (context) {
|
||||
return Dialog(
|
||||
|
||||
child: SizedBox(
|
||||
height: _height,
|
||||
child: Padding(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class LimitedTextSizeUtil {
|
||||
static double getLimitedBodyFontSize(BuildContext context, double baseFontSize, double maxFontSize, double limitedFontSize) {
|
||||
class LimitedFontSizeUtil {
|
||||
static double getCalculateFontSize(BuildContext context, double baseFontSize, double maxFontSize, double limitedFontSize) {
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
||||
return scaledFontSize > maxFontSize ? limitedFontSize : scaledFontSize;
|
||||
|
@ -18,4 +18,28 @@ class LimitedTextSizeUtil {
|
|||
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
||||
return scaledFontSize > maxFontSize ? sizeIfExceeded : sizeIfNotExceeded;
|
||||
}
|
||||
|
||||
static double getBodyFontSize(BuildContext context) {
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double scaledFontSize = 12 * textScaler.scale(1);
|
||||
return scaledFontSize > 12 ? 10 : scaledFontSize;
|
||||
}
|
||||
|
||||
static double getInputFontSize(BuildContext context) {
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double scaledFontSize = 12 * textScaler.scale(1);
|
||||
return scaledFontSize > 12 ? 10 : scaledFontSize;
|
||||
}
|
||||
|
||||
static double getHeaderFontSize(BuildContext context) {
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double scaledFontSize = 16 * textScaler.scale(1);
|
||||
return scaledFontSize > 16 ? 14 : scaledFontSize;
|
||||
}
|
||||
|
||||
static double getSubHeaderFontSize(BuildContext context) {
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double scaledFontSize = 14 * textScaler.scale(1);
|
||||
return scaledFontSize > 14 ? 12 : scaledFontSize;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue