WIP
This commit is contained in:
commit
e6e6b9cfdb
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"editor.quickSuggestions": {
|
||||
"comments": "off",
|
||||
"strings": "off",
|
||||
"other": "off"
|
||||
}
|
||||
}
|
||||
"editor.quickSuggestions": {
|
||||
"comments": "off",
|
||||
"strings": "off",
|
||||
"other": "off"
|
||||
},
|
||||
"java.configuration.updateBuildConfiguration": "automatic"
|
||||
}
|
||||
|
|
|
@ -73,10 +73,7 @@ android {
|
|||
storePassword keystoreProperties['storePassword']
|
||||
}
|
||||
debug {
|
||||
keyAlias keystoreProperties['keyAlias']
|
||||
keyPassword keystoreProperties['keyPassword']
|
||||
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
||||
storePassword keystoreProperties['storePassword']
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,6 +32,11 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double baseFontSize = 14;
|
||||
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
||||
final double limitedFontSize = scaledFontSize > 24 ? 12 : baseFontSize;
|
||||
|
||||
return InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
|
@ -47,8 +52,8 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
|||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
|
||||
child: Container(
|
||||
width: 120.0,
|
||||
height: 100.0,
|
||||
width: 300,
|
||||
height: 280,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
|
@ -96,7 +101,7 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
|||
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
fontSize: limitedFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||
|
|
|
@ -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,
|
||||
|
@ -131,6 +145,7 @@ class _CustomInputUtilState extends State<CustomInputUtil> {
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
),
|
||||
fontSize: limitedInputTextSize,
|
||||
),
|
||||
maxLines: null,
|
||||
maxLength: widget.haveMaxLength ? widget.maxLength : null,
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:hub/flutter_flow/flutter_flow_drop_down.dart';
|
|||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/flutter_flow/form_field_controller.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class CustomSelect extends StatefulWidget {
|
||||
|
@ -40,6 +41,9 @@ class _CustomSelectState extends State<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(
|
||||
|
@ -68,6 +72,7 @@ class _CustomSelectState extends State<CustomSelect> {
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintText: widget.hintText,
|
||||
icon: Icon(
|
||||
|
@ -110,6 +115,7 @@ class _CustomSelectState extends State<CustomSelect> {
|
|||
letterSpacing: 0.0,
|
||||
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,139 +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),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class TabViewUtil extends StatelessWidget {
|
||||
|
@ -38,7 +39,7 @@ class TabViewUtil extends StatelessWidget {
|
|||
unselectedLabelColor: FlutterFlowTheme.of(context).primaryText,
|
||||
labelStyle: FlutterFlowTheme.of(context).titleMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).titleMediumFamily,
|
||||
fontSize: 13.0,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleMediumFamily),
|
||||
),
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
|
||||
class ToastUtil {
|
||||
static void showToast({
|
||||
|
@ -8,7 +9,7 @@ class ToastUtil {
|
|||
Toast toastLength = Toast.LENGTH_SHORT,
|
||||
Color backgroundColor = Colors.black,
|
||||
Color textColor = Colors.white,
|
||||
double fontSize = 16.0,
|
||||
double fontSize = 16,
|
||||
}) {
|
||||
Fluttertoast.showToast(
|
||||
msg: message,
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:hub/components/molecular_components/message_opt_modal/opt_modal_
|
|||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
|
||||
class OptModalWidget extends StatefulWidget {
|
||||
final String defaultPersonType;
|
||||
|
@ -77,7 +78,9 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
context.pop(filterResult);
|
||||
}
|
||||
|
||||
Widget _buildCheckboxListTile(String key, List<Map<String, String>> options, double fontsize) {
|
||||
Widget _buildCheckboxListTile(
|
||||
String key, List<Map<String, String>> options, double fontsize) {
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
return Column(
|
||||
children: [
|
||||
Row(
|
||||
|
@ -91,7 +94,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),
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
|
@ -112,7 +115,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,
|
||||
),
|
||||
|
@ -166,6 +169,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),
|
||||
|
@ -189,7 +193,8 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 18.0,
|
||||
fontSize: LimitedFontSizeUtil.getHeaderFontSize(
|
||||
context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts:
|
||||
|
@ -218,7 +223,15 @@ class _OptModalWidgetState extends State<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),
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -7,6 +7,8 @@ import 'package:hub/flutter_flow/nav/nav.dart';
|
|||
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||
// ignore: unused_import
|
||||
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
|
||||
class OrderFilterModalWidget extends StatefulWidget {
|
||||
final String defaultAdresseeType;
|
||||
final String defaultStatus;
|
||||
|
@ -169,6 +171,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
|
||||
return Center(
|
||||
child: Container(
|
||||
|
@ -210,8 +213,9 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
_buildCheckboxListTile('adresseeType', adresseeTypeOptions, 14),
|
||||
_buildCheckboxListTile('status', statusOptions, 14),
|
||||
_buildCheckboxListTile(
|
||||
'adresseeType', adresseeTypeOptions, limitedBodyFontSize),
|
||||
_buildCheckboxListTile('status', statusOptions, limitedBodyFontSize),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -223,7 +227,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
foregroundColor: FlutterFlowTheme.of(context).info,
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
child: Text(FFLocalizations.of(context).getText('88kshkph')),
|
||||
child: Text(FFLocalizations.of(context).getText('88kshkph'), style: TextStyle(fontSize: limitedBodyFontSize)),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'package:flutter_animate/flutter_animate.dart';
|
|||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/shared/enums/enum_throw_exception.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
|
||||
import '/flutter_flow/flutter_flow_animations.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
|
@ -91,75 +92,76 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
|
|||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
key: const ValueKey('ThrowExceptionWidget'),
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pop();
|
||||
},
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
borderRadius: BorderRadius.circular(20.0), // Ajuste o valor conforme necessário
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const SizedBox(height: 20.0),
|
||||
Stack(
|
||||
children: <Widget>[
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Icon(
|
||||
_getIconByType(context),
|
||||
color: _getColorByType(context),
|
||||
size: 150.0,
|
||||
),
|
||||
@override Widget build(BuildContext context) {
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
return InkWell(
|
||||
key: const ValueKey('ThrowExceptionWidget'),
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pop();
|
||||
},
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
borderRadius: BorderRadius.circular(20.0), // Ajuste o valor conforme necessário
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const SizedBox(height: 20.0),
|
||||
Stack(
|
||||
children: <Widget>[
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Icon(
|
||||
_getIconByType(context),
|
||||
color: _getColorByType(context),
|
||||
size: 150.0,
|
||||
),
|
||||
],
|
||||
).animateOnPageLoad(animationsMap['stackOnPageLoadAnimation']!),
|
||||
const SizedBox(height: 20.0),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
_getTitleByType(context),
|
||||
),
|
||||
],
|
||||
).animateOnPageLoad(animationsMap['stackOnPageLoadAnimation']!),
|
||||
const SizedBox(height: 20.0),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
_getTitleByType(context),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(15.0, 10.0, 15.0, 0.0),
|
||||
child: Text(
|
||||
valueOrDefault<String>(widget.msg, 'Message Not Found'),
|
||||
overflow: TextOverflow.clip,
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: 20.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(15.0, 10.0, 15.0, 0.0),
|
||||
child: Text(
|
||||
valueOrDefault<String>(widget.msg, 'Message Not Found'),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import 'package:hub/flutter_flow/nav/nav.dart';
|
|||
import 'package:hub/shared/helpers/base_storage.dart';
|
||||
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:hub/shared/utils/log_util.dart';
|
||||
|
||||
import '../../../shared/services/authentication/authentication_service.dart';
|
||||
|
@ -52,7 +53,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
|||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
|
||||
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data.",),
|
||||
style: TextStyle(color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context),),
|
||||
),
|
||||
duration: const Duration(seconds: 3),
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
|
|
|
@ -56,6 +56,11 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double baseFontSize = 14.0;
|
||||
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
||||
final double limitedFontSize = scaledFontSize > 20 ? 12 : scaledFontSize;
|
||||
|
||||
return Container(
|
||||
decoration: const BoxDecoration(),
|
||||
child: Align(
|
||||
|
@ -85,8 +90,8 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
|
|||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await LocalizationService.selectLocal(context)
|
||||
.then((value) => value == true ? onUpdate() : null);
|
||||
await LocalizationService.selectLocal(context).then(
|
||||
(value) => value == true ? onUpdate() : null);
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(200.0),
|
||||
|
@ -113,22 +118,36 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
|
|||
)),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
valueOrDefault<String>(
|
||||
functions.convertToUppercase(_model.cliName),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'SEM LOCAL VINCULADO',
|
||||
enText: 'NO LINKED LOCAL',
|
||||
Expanded(
|
||||
child: Tooltip(
|
||||
message: valueOrDefault<String>(
|
||||
functions.convertToUppercase(_model.cliName),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'SEM LOCAL VINCULADO',
|
||||
enText: 'NO LINKED LOCAL',
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
valueOrDefault<String>(
|
||||
functions.convertToUppercase(_model.cliName),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'SEM LOCAL VINCULADO',
|
||||
enText: 'NO LINKED LOCAL',
|
||||
),
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: limitedFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
]
|
||||
.divide(const SizedBox(width: 20.0))
|
||||
|
|
|
@ -50,12 +50,16 @@ class _MenuStaggeredViewComponentWidgetState extends State<MenuStaggeredViewComp
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double scaledFontSize = 14 * textScaler.scale(1);
|
||||
final int crossAxisCount = scaledFontSize >= 26 ? 1 : scaledFontSize >= 18 ? 2 : 3;
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
GridView.builder(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: crossAxisCount,
|
||||
crossAxisSpacing: 10.0,
|
||||
mainAxisSpacing: 10.0,
|
||||
childAspectRatio: 1,
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'dart:collection';
|
|||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
|
@ -52,6 +53,8 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
|||
}
|
||||
|
||||
List<Widget> _generateLabels() {
|
||||
double limitedBodyTextSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
|
||||
return labelsLinkedHashMap.entries.map((entry) {
|
||||
final key = entry.key;
|
||||
final text = entry.value.toString();
|
||||
|
@ -68,6 +71,7 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
|||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedBodyTextSize,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
|
@ -77,7 +81,7 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
|||
overflow: TextOverflow.ellipsis,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: 12.5,
|
||||
fontSize: limitedBodyTextSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
|
@ -114,26 +118,30 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
|||
}
|
||||
|
||||
List<Widget> _generateStatus() {
|
||||
double limitedBodyTextSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
return statusLinkedHashMap.expand((statusLinked) {
|
||||
return statusLinked.entries.map((entry) {
|
||||
final text = entry.key;
|
||||
final color = entry.value;
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(5),
|
||||
width: MediaQuery.of(context).size.width * 0.25,
|
||||
decoration: BoxDecoration(
|
||||
color: color,
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
text,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
return Tooltip(
|
||||
message: text,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(5),
|
||||
width: MediaQuery.of(context).size.width * 0.25,
|
||||
decoration: BoxDecoration(
|
||||
color: color,
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
text,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: limitedBodyTextSize,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -6,6 +6,8 @@ import 'package:google_fonts/google_fonts.dart';
|
|||
import 'package:hub/components/templates_components/details_component/details_component_model.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
|
||||
|
||||
class DetailsComponentWidget extends StatefulWidget {
|
||||
const DetailsComponentWidget({
|
||||
|
@ -58,7 +60,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// CachedNetworkImage.evictFromCache(widget.imagePath ?? '');
|
||||
|
||||
final double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
return Container(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: MediaQuery.of(context).size.width,
|
||||
|
@ -123,6 +125,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
|
@ -131,6 +134,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
focusedBorder: InputBorder.none,
|
||||
errorBorder: InputBorder.none,
|
||||
|
@ -147,6 +151,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: null,
|
||||
|
@ -170,6 +175,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
return TextFormField(
|
||||
readOnly: true,
|
||||
initialValue: '$value',
|
||||
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
|
@ -177,8 +183,11 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
|
||||
decoration: InputDecoration(
|
||||
|
||||
labelText: key,
|
||||
filled: true,
|
||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
|
@ -195,9 +204,14 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
),
|
||||
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/shared/services/authentication/authentication_service.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:hub/shared/utils/validator_util.dart';
|
||||
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
|
@ -48,223 +49,258 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
|
||||
@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: Container(
|
||||
width: double.infinity,
|
||||
height: 300.0,
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: 570.0,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(0.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0),
|
||||
child: SingleChildScrollView(
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: 570.0,
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (responsiveVisibility(
|
||||
context: context,
|
||||
phone: false,
|
||||
tablet: false,
|
||||
))
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||
child: InkWell(
|
||||
key: const ValueKey<String>('BackButton'),
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.safePop();
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||
child: Icon(
|
||||
Icons.arrow_back_rounded,
|
||||
color: Color(0xFF15161E),
|
||||
size: 24.0,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(0.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 25, 0, 25),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (responsiveVisibility(
|
||||
context: context,
|
||||
phone: false,
|
||||
tablet: false,
|
||||
))
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 16.0, 8.0),
|
||||
child: InkWell(
|
||||
key: const ValueKey<String>('BackButton'),
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.safePop();
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 12.0, 0.0, 12.0),
|
||||
child: Icon(
|
||||
Icons.arrow_back_rounded,
|
||||
color: Color(0xFF15161E),
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
12.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
'',
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
'',
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context)
|
||||
.getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Outfit',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Outfit'),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Outfit',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 24.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText('wu2f7yzo' /* Não se preucupe nós vamos te a... */),
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
Form(
|
||||
key: _model.formKey,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
key: const ValueKey<String>('recoveryTextFormField'),
|
||||
controller: _model.emailAddressTextController,
|
||||
focusNode: _model.emailAddressFocusNode,
|
||||
onChanged: (_) => EasyDebounce.debounce(
|
||||
'_model.emailAddressTextController',
|
||||
const Duration(milliseconds: 500),
|
||||
() => setState(() {}),
|
||||
),
|
||||
autofocus: true,
|
||||
autofillHints: const [AutofillHints.email],
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getText('mtz8l7ft' /* E-mail */),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.black,
|
||||
width: 2.00,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
width: 2.00,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 2.00,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 2.00,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
contentPadding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0),
|
||||
suffixIcon: Icon(
|
||||
Icons.email,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
size: 22.0,
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 4.0, 16.0, 4.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'wu2f7yzo' /* Não se preucupe nós vamos te a... */),
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
maxLines: null,
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||
validator: _model.emailAddressTextControllerValidator.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('SendButtonWidget'),
|
||||
onPressed: (_model.emailAddressTextController.text == '' ||
|
||||
!ValidatorUtil.isValidEmail(_model.emailAddressTextController.text))
|
||||
? null
|
||||
: () async =>
|
||||
AuthenticationService.forgotPassword(context, _model.emailAddressTextController.text),
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'74rnd5bu' /* Enviar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: 270.0,
|
||||
height: 50.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
Form(
|
||||
key: _model.formKey,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 12.0, 16.0, 0.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
key: const ValueKey<String>('recoveryTextFormField'),
|
||||
controller: _model.emailAddressTextController,
|
||||
focusNode: _model.emailAddressFocusNode,
|
||||
onChanged: (_) => EasyDebounce.debounce(
|
||||
'_model.emailAddressTextController',
|
||||
const Duration(milliseconds: 500),
|
||||
() => setState(() {}),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
autofocus: true,
|
||||
autofillHints: const [AutofillHints.email],
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getText('mtz8l7ft' /* E-mail */),
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.black,
|
||||
width: 2.00,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
width: 2.00,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 2.00,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 2.00,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
contentPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 24.0, 20.0, 24.0),
|
||||
suffixIcon: Icon(
|
||||
Icons.email,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
size: 22.0,
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
maxLines: null,
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||
validator: _model.emailAddressTextControllerValidator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||
disabledTextColor: Colors.white,
|
||||
),
|
||||
showLoadingIndicator: true,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 24.0, 0.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('SendButtonWidget'),
|
||||
onPressed: (_model.emailAddressTextController.text ==
|
||||
'' ||
|
||||
!ValidatorUtil.isValidEmail(
|
||||
_model.emailAddressTextController.text))
|
||||
? null
|
||||
: () async => AuthenticationService.forgotPassword(
|
||||
context, _model.emailAddressTextController.text),
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'74rnd5bu' /* Enviar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: 270.0,
|
||||
height: 50.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle:
|
||||
FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
disabledColor:
|
||||
FlutterFlowTheme.of(context).customColor5,
|
||||
disabledTextColor: Colors.white,
|
||||
),
|
||||
showLoadingIndicator: true,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'package:google_fonts/google_fonts.dart';
|
|||
import 'package:hub/components/templates_components/message_notificaion_modal_template_component/message_notification_model.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
|
||||
class MessageNotificationModalTemplateComponentWidget extends StatefulWidget {
|
||||
const MessageNotificationModalTemplateComponentWidget({
|
||||
|
@ -57,6 +58,9 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
|
||||
return Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height,
|
||||
|
@ -94,12 +98,14 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
@ -115,6 +121,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
|
@ -145,6 +152,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
|
@ -152,6 +160,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
@ -197,12 +206,14 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
@ -218,6 +229,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
|
|
|
@ -5,6 +5,7 @@ import 'package:flutter/services.dart';
|
|||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:hub/shared/utils/log_util.dart';
|
||||
|
||||
import '/backend/api_requests/api_calls.dart';
|
||||
|
@ -38,6 +39,11 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
|
||||
@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(
|
||||
|
@ -63,9 +69,13 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
child: Text(
|
||||
FFLocalizations.of(context).getText('uj8acuab'),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: 16.0,
|
||||
overflow: TextOverflow.clip,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts:
|
||||
|
@ -95,7 +105,10 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -141,16 +154,32 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
memCacheHeight: 35,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(15.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
model.cliName,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(15.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
model.cliName,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -180,7 +209,10 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -219,6 +251,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
|
@ -226,6 +259,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -264,8 +299,14 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
|
@ -310,6 +351,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -349,6 +392,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
validator: model.dateTimeTextControllerValidator.asValidator(context),
|
||||
|
@ -492,6 +537,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
child: TextFormField(
|
||||
controller: model.notesTextController,
|
||||
focusNode: model.notesFocusNode,
|
||||
|
||||
autofocus: false,
|
||||
showCursor: true,
|
||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||
|
@ -499,15 +545,44 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
counterStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
.bodyText1
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyText1Family,
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
labelText:
|
||||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'cw8b3tbb' /* Observação da Visita */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
labelStyle: 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),
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
|
@ -515,6 +590,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -555,6 +631,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 3,
|
||||
|
@ -619,10 +697,12 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
showLoadingIndicator: true,
|
||||
text: FFLocalizations.of(context).getText('bv5fg9sv' /* Enviar */),
|
||||
options: FFButtonOptions(
|
||||
width: 150.0,
|
||||
height: 50.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),
|
||||
|
||||
height: 30.0 * MediaQuery.textScalerOf(context).scale(1),
|
||||
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,
|
||||
|
@ -630,7 +710,9 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
|
@ -50,13 +51,16 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 300.0,
|
||||
height: 300 * MediaQuery.textScalerOf(context).scale(1),
|
||||
constraints: const BoxConstraints(
|
||||
minHeight: 300.0,
|
||||
maxWidth: 570.0,
|
||||
maxHeight: 500,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
|
@ -67,95 +71,103 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
topRight: Radius.circular(15.0),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// This row exists for when the "app bar" is hidden on desktop, having a way back for the user can work well.
|
||||
if (responsiveVisibility(
|
||||
context: context,
|
||||
phone: false,
|
||||
tablet: false,
|
||||
))
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.safePop();
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||
child: Icon(
|
||||
Icons.arrow_back_rounded,
|
||||
color: Color(0xFF15161E),
|
||||
size: 24.0,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// This row exists for when the "app bar" is hidden on desktop, having a way back for the user can work well.
|
||||
if (responsiveVisibility(
|
||||
context: context,
|
||||
phone: false,
|
||||
tablet: false,
|
||||
))
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.safePop();
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 12.0, 0.0, 12.0),
|
||||
child: Icon(
|
||||
Icons.arrow_back_rounded,
|
||||
color: Color(0xFF15161E),
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
'',
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
12.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
'',
|
||||
style:
|
||||
FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 16, 16, 14),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'h1xilful' /* DIGITE A SUA SENHA */,
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 10.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'h1xilful' /* DIGITE A SUA SENHA */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Outfit',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 20, 20, 18),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Outfit',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 24.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'ujodm2ci' /* Para gerar o QR Code digite a ... */,
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'ujodm2ci' /* Para gerar o QR Code digite a ... */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 14, 14, 12),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
Form(
|
||||
key: _model.formKey,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
Form(
|
||||
key: _model.formKey,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||
child: TextFormField(
|
||||
controller: _model.keyTextFieldTextController,
|
||||
focusNode: _model.keyTextFieldFocusNode,
|
||||
|
@ -174,25 +186,30 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'rfqrdet7' /* Senha */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'zz1haydj' /* digite a sua senha..... */,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
hintStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
|
@ -239,7 +256,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
|
@ -256,49 +273,54 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
if (_model.formKey.currentState == null || !_model.formKey.currentState!.validate()) {
|
||||
return;
|
||||
}
|
||||
await widget.toggleActionStatus?.call(
|
||||
_model.keyTextFieldTextController.text,
|
||||
);
|
||||
context.pop();
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'2cybbi5p' /* Enviar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: 270.0,
|
||||
height: 50.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: const Color(0xFF1AAB5F),
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 15),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
if (_model.formKey.currentState == null ||
|
||||
!_model.formKey.currentState!.validate()) {
|
||||
return;
|
||||
}
|
||||
await widget.toggleActionStatus?.call(
|
||||
_model.keyTextFieldTextController.text,
|
||||
);
|
||||
context.pop();
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'2cybbi5p' /* Enviar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: 270.0,
|
||||
height: 50.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: const Color(0xFF1AAB5F),
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -63,7 +63,7 @@ class RegisiterVistorTemplateComponentModel extends FlutterFlowModel<RegisiterVi
|
|||
enText: 'This field is required',
|
||||
ptText: 'Este campo é obrigatório',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -2,8 +2,10 @@ 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';
|
||||
import 'package:hub/shared/utils/validator_util.dart';
|
||||
import 'package:rxdart/rxdart.dart';
|
||||
|
||||
|
@ -30,7 +32,7 @@ class RegisiterVistorTemplateComponentWidget extends StatefulWidget {
|
|||
|
||||
class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistorTemplateComponentWidget> {
|
||||
late RegisiterVistorTemplateComponentModel _model;
|
||||
|
||||
bool _isLoading = false;
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
bool _isVisitorRegistered = false;
|
||||
|
@ -112,6 +114,11 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Container(
|
||||
|
@ -137,17 +144,20 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(20.0, 0.0, 0.0, 15.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
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: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -178,13 +188,18 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
hintStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
|
@ -206,6 +221,10 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
),
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
|
@ -222,8 +241,9 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
onChanged: (value) {
|
||||
_model.debounce(() async {
|
||||
|
@ -258,7 +278,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
color: Theme.of(context).brightness == Brightness.dark
|
||||
? Color.alphaBlend(Colors.white.withOpacity(0.7), Colors.red)
|
||||
: Color.alphaBlend(Colors.black.withOpacity(0.25), Colors.red),
|
||||
fontSize: 13.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
)),
|
||||
),
|
||||
|
@ -293,6 +313,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
|
@ -300,6 +321,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -322,6 +344,10 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
),
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
|
@ -340,6 +366,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
maxLines: null,
|
||||
maxLength: 80,
|
||||
|
@ -371,9 +398,11 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'pmezihb4' /* Selecione... */,
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Visitor Type',
|
||||
ptText: 'Tipo de Visitante',
|
||||
),
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_down_rounded,
|
||||
|
@ -399,8 +428,8 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
padding: const EdgeInsetsDirectional.only(top: 5, start: 15),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'This field is required',
|
||||
ptText: 'Este campo é obrigatório',
|
||||
enText: 'Select the type of visitor',
|
||||
ptText: 'Selecione o tipo de visitante',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
||||
|
@ -408,6 +437,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
)),
|
||||
),
|
||||
],
|
||||
|
@ -443,118 +473,21 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
);
|
||||
} else {
|
||||
return Stack(
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
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;
|
||||
});
|
||||
final String message = FFLocalizations.of(context).getVariableText(
|
||||
enText: 'File uploaded successfully',
|
||||
ptText: 'Arquivo enviado com sucesso',
|
||||
);
|
||||
showUploadMessage(context, message);
|
||||
} else {
|
||||
setState(() {});
|
||||
final String message = FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Failed to upload data',
|
||||
ptText: 'Falha ao enviar os 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),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 65.0, 10.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'p4ftwxcy' /* Clique para adicionar a foto p... */,
|
||||
),
|
||||
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),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
children: [
|
||||
MediaUploadButtonUtil(
|
||||
onUploadComplete: (uploadedFile) {
|
||||
setState(() {
|
||||
_model.uploadedLocalFile = uploadedFile;
|
||||
});
|
||||
},
|
||||
isUploading: _model.isDataUploading,
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
'p4ftwxcy' /* Selecione uma foto */,
|
||||
),
|
||||
uploadedFiles: _model.uploadedLocalFile,
|
||||
),
|
||||
]
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
|
@ -573,6 +506,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -606,6 +540,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
|
@ -613,6 +548,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -653,6 +589,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
// validator:
|
||||
// _model.textController3Validator.asValidator(context),
|
||||
|
@ -685,6 +622,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
|
@ -692,6 +630,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -732,6 +671,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
||||
|
@ -778,7 +718,11 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Visitante cadastrado com sucesso.',
|
||||
enText: 'Visitor successfully registered.'),
|
||||
style: TextStyle(color: FlutterFlowTheme.of(context).info)),
|
||||
style: TextStyle(color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: limitedInputFontSize,
|
||||
)
|
||||
),
|
||||
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
duration: const Duration(seconds: 3),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
|
@ -814,8 +758,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
'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),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
|
@ -826,6 +769,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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/helpers/base_storage.dart';
|
||||
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||
import 'package:hub/shared/utils/validator_util.dart';
|
||||
|
@ -18,13 +19,15 @@ import 'sign_up_template_component_model.dart';
|
|||
export 'sign_up_template_component_model.dart';
|
||||
|
||||
class SignUpTemplateComponentWidget extends StatefulWidget {
|
||||
const SignUpTemplateComponentWidget({super.key, required this.toggleSignInPage});
|
||||
const SignUpTemplateComponentWidget(
|
||||
{super.key, required this.toggleSignInPage});
|
||||
final Future Function()? toggleSignInPage;
|
||||
@override
|
||||
State<SignUpTemplateComponentWidget> createState() => _SignUpTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
|
||||
class _SignUpTemplateComponentWidgetState
|
||||
extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
|
||||
late SignUpTemplateComponentModel _model;
|
||||
final animationsMap = <String, AnimationInfo>{};
|
||||
late String _deviceType;
|
||||
|
@ -104,6 +107,10 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
Widget build(BuildContext context) {
|
||||
final MediaQueryData mediaQuery = MediaQuery.of(context);
|
||||
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 == '' ||
|
||||
|
@ -143,42 +150,28 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Container(
|
||||
width: 669.0,
|
||||
height: 112.0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16.0),
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
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'),
|
||||
),
|
||||
),
|
||||
),
|
||||
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'),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -250,7 +243,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
|
@ -277,7 +270,19 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
errorStyle: TextStyle(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
fontSize: limitedInputFontSize,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontStyle: FontStyle.normal,
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.25,
|
||||
|
@ -295,7 +300,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
|
@ -330,7 +335,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
|
@ -357,7 +362,19 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
errorStyle: TextStyle(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
fontSize: limitedInputFontSize,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontStyle: FontStyle.normal,
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.25,
|
||||
|
@ -375,7 +392,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
|
@ -411,7 +428,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
|
@ -438,9 +455,23 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Color(0xFFFF5963),
|
||||
errorStyle: TextStyle(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
fontSize: limitedInputFontSize,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontStyle: FontStyle.normal,
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide:
|
||||
const BorderSide(
|
||||
color:
|
||||
Color(0xFFFF5963),
|
||||
width: 0.25,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
|
@ -448,7 +479,9 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
filled: true,
|
||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
suffixIcon: InkWell(
|
||||
key: const ValueKey<String>('passwordVisibilitySuffixIcon'),
|
||||
key: const ValueKey<
|
||||
String>(
|
||||
'passwordVisibilitySuffixIcon'),
|
||||
onTap: () => setState(
|
||||
() => _model.passwordRegisterFormVisibility =
|
||||
!_model.passwordRegisterFormVisibility,
|
||||
|
@ -466,7 +499,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
|
@ -483,7 +516,8 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('SubmitButtonWidget'),
|
||||
key: const ValueKey<String>(
|
||||
'SubmitButtonWidget'),
|
||||
onPressed: isFormInvalid()
|
||||
? null
|
||||
: () async {
|
||||
|
@ -497,12 +531,17 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
);
|
||||
shouldSetState = true;
|
||||
if (_model.register == true)
|
||||
await widget.toggleSignInPage?.call();
|
||||
|
||||
await widget
|
||||
.toggleSignInPage
|
||||
?.call();
|
||||
else {
|
||||
if (shouldSetState) setState(() {});
|
||||
if (shouldSetState)
|
||||
setState(() {});
|
||||
return;
|
||||
}
|
||||
if (shouldSetState) setState(() {});
|
||||
if (shouldSetState)
|
||||
setState(() {});
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'rnvdwzei' /* Cadastrar-se */,
|
||||
|
@ -516,7 +555,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
|
@ -538,12 +577,15 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||
child: InkWell(
|
||||
key: const ValueKey<String>('toggleSignInPage'),
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignInPage'),
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async => await widget.toggleSignInPage?.call(),
|
||||
onTap: () async => await widget
|
||||
.toggleSignInPage
|
||||
?.call(),
|
||||
child: RichText(
|
||||
textScaler: MediaQuery.of(context).textScaler,
|
||||
text: TextSpan(
|
||||
|
@ -554,6 +596,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
|
@ -563,7 +606,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
fontSize: 14.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts:
|
||||
|
|
|
@ -14,6 +14,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/nav/nav.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
|
||||
class VisitorSearchModalTemplateComponentWidget extends StatefulWidget {
|
||||
const VisitorSearchModalTemplateComponentWidget({
|
||||
|
@ -56,281 +57,287 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
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),
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(0.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 40,
|
||||
height: 5,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[300],
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 40,
|
||||
height: 5,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[300],
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 25.0, 16.0, 0.0),
|
||||
child: TextFormField(
|
||||
controller: _model.textController,
|
||||
focusNode: _model.textFieldFocusNode,
|
||||
onFieldSubmitted: (_) async {
|
||||
await addVisitor(context);
|
||||
safeSetState(() {});
|
||||
},
|
||||
autofocus: false,
|
||||
textInputAction: TextInputAction.done,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getText('cjlpru1m'),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: FlutterFlowTheme.of(context).accent1, width: 0.5),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(15.0),
|
||||
bottomRight: Radius.circular(15.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0)),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: FlutterFlowTheme.of(context).primary, width: 0.5),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(15.0),
|
||||
bottomRight: Radius.circular(15.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0)),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: FlutterFlowTheme.of(context).error, width: 0.5),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(15.0),
|
||||
bottomRight: Radius.circular(15.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0)),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: FlutterFlowTheme.of(context).error, width: 0.5),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(15.0),
|
||||
bottomRight: Radius.circular(15.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0)),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
prefixIcon: Icon(Icons.search_outlined, color: FlutterFlowTheme.of(context).accent1),
|
||||
Column(children: [
|
||||
|
||||
],),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 25.0, 16.0, 0.0),
|
||||
child: TextFormField(
|
||||
controller: _model.textController,
|
||||
focusNode: _model.textFieldFocusNode,
|
||||
onFieldSubmitted: (_) async {
|
||||
await addVisitor(context);
|
||||
safeSetState(() {});
|
||||
},
|
||||
autofocus: false,
|
||||
textInputAction: TextInputAction.done,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Document of the Visitor',
|
||||
ptText: 'Documento do Visitante',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
keyboardType: const TextInputType.numberWithOptions(signed: true),
|
||||
validator: _model.textControllerValidator.asValidator(context),
|
||||
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: FlutterFlowTheme.of(context).accent1, width: 0.5),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(15.0),
|
||||
bottomRight: Radius.circular(15.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0)),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: FlutterFlowTheme.of(context).primary, width: 0.5),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(15.0),
|
||||
bottomRight: Radius.circular(15.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0)),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: FlutterFlowTheme.of(context).error, width: 0.5),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(15.0),
|
||||
bottomRight: Radius.circular(15.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0)),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: FlutterFlowTheme.of(context).error, width: 0.5),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(15.0),
|
||||
bottomRight: Radius.circular(15.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0)),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
prefixIcon: Icon(Icons.search_outlined, color: FlutterFlowTheme.of(context).accent1),
|
||||
),
|
||||
),
|
||||
if (_model.visitors.isNotEmpty && _model.visitors.isNotEmpty)
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText('9coywebh'),
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(4.0, 12.0, 16.0, 0.0),
|
||||
child: Text(
|
||||
_model.visitors.length.toString(),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
if (_model.visitors.isNotEmpty) {
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 8.0, 8.0, 0.0),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
final visitor = _model.visitors.map((e) => e).toList();
|
||||
final doc = _model.docs.map((e) => e).toList();
|
||||
return ListView.builder(
|
||||
padding: EdgeInsets.zero,
|
||||
scrollDirection: Axis.vertical,
|
||||
itemCount: visitor.length,
|
||||
itemBuilder: (context, visitorIndex) {
|
||||
final visitorItem = visitor[visitorIndex];
|
||||
final docItem = doc[visitorIndex];
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 1.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(40.0),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration: const Duration(milliseconds: 500),
|
||||
fadeOutDuration: const Duration(milliseconds: 500),
|
||||
imageUrl:
|
||||
"https://freaccess.com.br/freaccess/getImage.php?devUUID=${_model.devUUID}&userUUID=${_model.userUUID}&cliID=${_model.cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||
visitorItem,
|
||||
r'''$.VTE_DOCUMENTO''',
|
||||
).toString()}&tipo=E",
|
||||
width: 60.0,
|
||||
height: 60.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
valueOrDefault<String>(
|
||||
getJsonField(visitorItem, r'''$.VTE_NOME''')?.toString(),
|
||||
'NOT FOUND',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyLargeFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyLargeFamily),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
FlutterFlowIconButton(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
icon: Icon(Icons.close,
|
||||
color: FlutterFlowTheme.of(context).customColor6, size: 20.0),
|
||||
onPressed: () async {
|
||||
_model.removeFromVisitors(visitorItem);
|
||||
_model.removeFromDocs(docItem);
|
||||
safeSetState(() {});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(color: FlutterFlowTheme.of(context).primaryBackground),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
keyboardType: const TextInputType.numberWithOptions(signed: true),
|
||||
validator: _model.textControllerValidator.asValidator(context),
|
||||
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
|
||||
),
|
||||
),
|
||||
if (_model.visitors.isNotEmpty && _model.visitors.isNotEmpty)
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
FFButtonWidget(
|
||||
onPressed: MediaQuery.of(context).viewInsets.bottom > 0
|
||||
? () async => await addVisitor(context).whenComplete(safeSetState(() {}))
|
||||
: () async => await sendVisitors(context),
|
||||
text: MediaQuery.of(context).viewInsets.bottom > 0
|
||||
? FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Add',
|
||||
ptText: 'Adicionar',
|
||||
)
|
||||
: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Submit',
|
||||
ptText: 'Enviar',
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: MediaQuery.of(context).size.width * 0.3,
|
||||
height: MediaQuery.of(context).size.width * 0.1,
|
||||
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,
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText('9coywebh'),
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(4.0, 12.0, 16.0, 0.0),
|
||||
child: Text(
|
||||
_model.visitors.length.toString(),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedHeaderFontSize,
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(15),
|
||||
bottomRight: Radius.circular(15),
|
||||
topLeft: Radius.circular(15),
|
||||
topRight: Radius.circular(15)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 30.0)
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
if (_model.visitors.isNotEmpty) {
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 8.0, 8.0, 0.0),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
final visitor = _model.visitors.map((e) => e).toList();
|
||||
final doc = _model.docs.map((e) => e).toList();
|
||||
return ListView.builder(
|
||||
padding: EdgeInsets.zero,
|
||||
scrollDirection: Axis.vertical,
|
||||
itemCount: visitor.length,
|
||||
itemBuilder: (context, visitorIndex) {
|
||||
final visitorItem = visitor[visitorIndex];
|
||||
final docItem = doc[visitorIndex];
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 1.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(40.0),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration: const Duration(milliseconds: 500),
|
||||
fadeOutDuration: const Duration(milliseconds: 500),
|
||||
imageUrl:
|
||||
"https://freaccess.com.br/freaccess/getImage.php?devUUID=${_model.devUUID}&userUUID=${_model.userUUID}&cliID=${_model.cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||
visitorItem,
|
||||
r'''$.VTE_DOCUMENTO''',
|
||||
).toString()}&tipo=E",
|
||||
width: 60.0,
|
||||
height: 60.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
valueOrDefault<String>(
|
||||
getJsonField(visitorItem, r'''$.VTE_NOME''')?.toString(),
|
||||
'NOT FOUND',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyLargeFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyLargeFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
FlutterFlowIconButton(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
icon: Icon(Icons.close,
|
||||
color: FlutterFlowTheme.of(context).customColor6, size: 20.0),
|
||||
onPressed: () async {
|
||||
_model.removeFromVisitors(visitorItem);
|
||||
_model.removeFromDocs(docItem);
|
||||
safeSetState(() {});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(color: FlutterFlowTheme.of(context).primaryBackground),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
FFButtonWidget(
|
||||
onPressed: MediaQuery.of(context).viewInsets.bottom > 0
|
||||
? () async => await addVisitor(context).whenComplete(safeSetState(() {}))
|
||||
: () async => await sendVisitors(context),
|
||||
text: MediaQuery.of(context).viewInsets.bottom > 0
|
||||
? FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Add',
|
||||
ptText: 'Adicionar',
|
||||
)
|
||||
: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Submit',
|
||||
ptText: 'Enviar',
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: MediaQuery.of(context).size.width * 0.4,
|
||||
height: 40,
|
||||
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: limitedInputFontSize,
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(15),
|
||||
bottomRight: Radius.circular(15),
|
||||
topLeft: Radius.circular(15),
|
||||
topRight: Radius.circular(15)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 30.0)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -365,7 +372,9 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
message: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Visitante já adicionado!', enText: 'Visitor already added!'),
|
||||
gravity: ToastGravity.TOP,
|
||||
backgroundColor: Colors.red);
|
||||
backgroundColor: Colors.red,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
await showAdaptiveDialog(
|
||||
|
|
|
@ -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';
|
||||
|
@ -25,7 +26,9 @@ class WelcomeTemplateComponentWidget extends StatefulWidget {
|
|||
State<WelcomeTemplateComponentWidget> createState() => _WelcomeTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponentWidget> with TickerProviderStateMixin {
|
||||
class _WelcomeTemplateComponentWidgetState
|
||||
extends State<WelcomeTemplateComponentWidget>
|
||||
with TickerProviderStateMixin {
|
||||
late WelcomeTemplateComponentModel _model;
|
||||
final animationsMap = <String, AnimationInfo>{};
|
||||
|
||||
|
@ -86,6 +89,10 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
|
||||
@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(
|
||||
|
@ -93,64 +100,56 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: SafeArea(
|
||||
child: Container(
|
||||
width: 648.0,
|
||||
height: 208.0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16.0),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(14.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(context)
|
||||
.getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(14.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(context).getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
fontSize: 24.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText('5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 15.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 284.0,
|
||||
height: 200.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
child: const AtomImageSvgTheme(filename: 'welcome', width: 600, height: double.infinity),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 25, 0, 0),
|
||||
child: Container(
|
||||
width: 284.0,
|
||||
height: 200.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
child: const AtomImageSvgTheme(
|
||||
filename: 'welcome', width: 600, height: double.infinity),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
|
@ -183,14 +182,20 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
children: [
|
||||
Builder(
|
||||
builder: (context) {
|
||||
if (MediaQuery.sizeOf(context).width < kBreakpointSmall ? true : false) {
|
||||
if (MediaQuery.sizeOf(context).width <
|
||||
kBreakpointSmall
|
||||
? true
|
||||
: false) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('toggleSignInPage'),
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignInPage'),
|
||||
onPressed: () async {
|
||||
await widget.toggleSignInPage?.call();
|
||||
},
|
||||
|
@ -198,13 +203,20 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
textStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: 16.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
|
@ -238,10 +250,11 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
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(
|
||||
|
@ -264,9 +277,11 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('toggleSignInPage'),
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignInPage'),
|
||||
onPressed: () async {
|
||||
await widget.toggleSignInPage?.call();
|
||||
await widget.toggleSignInPage
|
||||
?.call();
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'zvtay8ee' /* Entrar */,
|
||||
|
@ -300,7 +315,8 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('toggleSignUpPage'),
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignUpPage'),
|
||||
onPressed: () async {
|
||||
await widget.toggleSignUpPage?.call();
|
||||
},
|
||||
|
|
|
@ -10,6 +10,7 @@ import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
|||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||
import 'package:hub/flutter_flow/internationalization.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:json_path/json_path.dart';
|
||||
import 'package:timeago/timeago.dart' as timeago;
|
||||
|
@ -189,6 +190,12 @@ Theme wrapInMaterialTimePickerTheme(
|
|||
required double iconSize,
|
||||
}) {
|
||||
final baseTheme = Theme.of(context);
|
||||
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double baseFontSize = 14.0;
|
||||
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
||||
final double limitedFontSize = scaledFontSize > 14.0 ? 8 : scaledFontSize;
|
||||
|
||||
return Theme(
|
||||
data: baseTheme.copyWith(
|
||||
focusColor: headerBackgroundColor,
|
||||
|
@ -264,6 +271,10 @@ Theme wrapInMaterialTimePickerTheme(
|
|||
dayPeriodBorderSide: BorderSide(
|
||||
color: pickerForegroundColor,
|
||||
),
|
||||
dialTextStyle: baseTheme.textTheme.headlineMedium!.copyWith(
|
||||
color: pickerDialForegroundColor,
|
||||
fontSize: limitedFontSize,
|
||||
),
|
||||
dayPeriodTextColor: WidgetStateColor.resolveWith((states) =>
|
||||
states.contains(WidgetState.selected) ? selectedDateTimeForegroundColor : pickerForegroundColor),
|
||||
dayPeriodColor: WidgetStateColor.resolveWith(
|
||||
|
@ -513,6 +524,7 @@ void showSnackbar(
|
|||
message,
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -527,14 +539,22 @@ void showSnackbar(
|
|||
);
|
||||
}
|
||||
|
||||
void showAlertDialog(BuildContext context, String title, String content, Future<void> Function() action) {
|
||||
void showAlertDialog(BuildContext context, String title, String content,
|
||||
Future<void> Function() action) {
|
||||
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),
|
||||
content: Text(content),
|
||||
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: limitedBodyFontSize)),
|
||||
),
|
||||
actions: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
|
@ -544,15 +564,17 @@ void showAlertDialog(BuildContext context, String title, String content, Future<
|
|||
onPressed: () => context.pop(), //Navigator.pop(context),
|
||||
options: FFButtonOptions(
|
||||
width: MediaQuery.of(context).size.width * 0.3,
|
||||
height: MediaQuery.of(context).size.height * 0.05,
|
||||
height: 50,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedInputFontSize
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
width: 1,
|
||||
),
|
||||
splashColor: const Color.fromARGB(255, 129, 129, 129),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
elevation: 0,
|
||||
),
|
||||
|
@ -567,12 +589,14 @@ void showAlertDialog(BuildContext context, String title, String content, Future<
|
|||
},
|
||||
options: FFButtonOptions(
|
||||
width: MediaQuery.of(context).size.width * 0.3,
|
||||
height: MediaQuery.of(context).size.height * 0.05,
|
||||
height: 50,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
elevation: 0,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedInputFontSize
|
||||
),
|
||||
splashColor: const Color.fromARGB(255, 129, 129, 129),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
width: 1,
|
||||
|
|
|
@ -93,12 +93,13 @@ class _FFButtonWidgetState extends State<FFButtonWidget> {
|
|||
),
|
||||
),
|
||||
)
|
||||
: AutoSizeText(
|
||||
: Text(
|
||||
text ?? '',
|
||||
style: text == null ? null : widget.options.textStyle?.withoutColor(),
|
||||
textAlign: widget.options.textAlign,
|
||||
maxLines: maxLines,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
||||
);
|
||||
|
||||
final onPressed = widget.onPressed != null
|
||||
|
|
|
@ -7,6 +7,7 @@ import 'package:google_fonts/google_fonts.dart';
|
|||
import 'package:google_mlkit_face_detection/google_mlkit_face_detection.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:mime_type/mime_type.dart';
|
||||
|
||||
|
@ -557,7 +558,11 @@ void showUploadMessage(
|
|||
: null,
|
||||
),
|
||||
),
|
||||
Text(message, style: FlutterFlowTheme.of(context).bodyMedium),
|
||||
|
||||
Text(
|
||||
message, style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context), )),
|
||||
],
|
||||
),
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
|
|
|
@ -167,6 +167,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
|
|||
const Breakpoint(start: 1921, end: 2560, name: HD4K),
|
||||
const Breakpoint(start: 2561, end: double.infinity, name: ULTRAWIDE),
|
||||
];
|
||||
|
||||
return ResponsiveBreakpoints.builder(
|
||||
child: BouncingScrollWrapper.builder(context, widget!),
|
||||
breakpoints: breakpoints,
|
||||
|
|
|
@ -11,6 +11,7 @@ import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
|||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/pages/acess_history_page/acess_history_page_model.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:hub/shared/utils/log_util.dart';
|
||||
import 'package:rxdart/rxdart.dart';
|
||||
|
||||
|
@ -223,6 +224,7 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
|||
SnackBar(
|
||||
content: Text(
|
||||
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
|
||||
style: TextStyle(color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context),),
|
||||
),
|
||||
duration: const Duration(seconds: 3),
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
|
|
|
@ -20,7 +20,7 @@ class HomePageWidget extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _HomePageWidgetState extends State<HomePageWidget> {
|
||||
late HomePageModel _model;
|
||||
late HomePageModel _model;
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
late LocalProfileComponentWidget _localProfileComponentWidget;
|
||||
|
@ -47,6 +47,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
_model.textFieldFocusNode ??= FocusNode();
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
StorageHelper().context = context;
|
||||
|
@ -139,7 +140,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Widget buildBody() {
|
||||
return Container(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
|
|
|
@ -10,6 +10,7 @@ import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
|||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/pages/liberation_history/liberation_history_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/validator_util.dart';
|
||||
|
||||
|
@ -347,6 +348,10 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
|||
SnackBar(
|
||||
content: Text(
|
||||
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||
),
|
||||
),
|
||||
duration: const Duration(seconds: 3),
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
|
|
|
@ -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 {
|
||||
|
@ -161,7 +162,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
|||
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'),
|
||||
|
@ -173,6 +174,8 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
|||
}
|
||||
|
||||
Widget _body(BuildContext context) {
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
return SafeArea(
|
||||
top: true,
|
||||
child: Column(
|
||||
|
@ -186,7 +189,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
|||
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),
|
||||
),
|
||||
|
@ -223,8 +226,13 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Center(
|
||||
child: Text(FFLocalizations.of(context)
|
||||
.getVariableText(ptText: "Nenhuma mensagem encontrada!", enText: "No message found")),
|
||||
child: Text(FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Nenhuma mensagem encontrada!",
|
||||
enText: "No message found"),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedSubHeaderFontSize,)
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -267,6 +275,10 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
|||
SnackBar(
|
||||
content: Text(
|
||||
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||
),
|
||||
),
|
||||
duration: const Duration(seconds: 3),
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
|
@ -275,6 +287,8 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
|||
}
|
||||
|
||||
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(
|
||||
|
@ -309,7 +323,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
|||
jsonBody['MSG_ORIGEM_DESC'].toString(),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 15,
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
overflow: TextOverflow.fade,
|
||||
|
@ -334,8 +348,9 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
|||
jsonBody['MSG_DATE'].toString(),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 10,
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
fontSize: limitedBodyFontSize,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).customColor6,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
|
@ -357,6 +372,11 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
|||
Expanded(
|
||||
child: Text(
|
||||
jsonBody['MSG_TEXTO'].toString(),
|
||||
style: TextStyle(
|
||||
fontSize: limitedBodyFontSize,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).customColor6,
|
||||
),
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(width: 15)),
|
||||
|
|
|
@ -12,6 +12,7 @@ import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
|||
import 'package:hub/shared/helpers/base_storage.dart';
|
||||
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:hub/shared/utils/log_util.dart';
|
||||
import 'package:hub/shared/utils/validator_util.dart';
|
||||
import 'package:rxdart/rxdart.dart';
|
||||
|
@ -79,6 +80,10 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
|||
SnackBar(
|
||||
content: Text(
|
||||
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||
),
|
||||
),
|
||||
duration: const Duration(seconds: 3),
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
|
@ -158,25 +163,31 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
|||
child: IconButton(
|
||||
icon: const Icon(Icons.filter_list),
|
||||
onPressed: () async {
|
||||
final Map<String, String>? selectedFilter = await showModalBottomSheet<Map<String, String>>(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => Navigator.of(context).pop(),
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: GestureDetector(
|
||||
onTap: () {},
|
||||
child: OrderFilterModalWidget(
|
||||
defaultAdresseeType: _selectedTypeSubject.value['adresseeType'] ?? '.*',
|
||||
defaultStatus: _selectedTypeSubject.value['status'] ?? '.*',
|
||||
final Map<String, String>? selectedFilter =
|
||||
await showModalBottomSheet<Map<String, String>>(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => Navigator.of(context).pop(),
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: GestureDetector(
|
||||
onTap: () {},
|
||||
child: OrderFilterModalWidget(
|
||||
defaultAdresseeType: _selectedTypeSubject
|
||||
.value['adresseeType'] ??
|
||||
'.*',
|
||||
defaultStatus:
|
||||
_selectedTypeSubject.value['status'] ??
|
||||
'.*',
|
||||
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
);
|
||||
});
|
||||
|
||||
if (selectedFilter != null) {
|
||||
_updateFilterAction(selectedFilter);
|
||||
|
@ -250,8 +261,13 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
|||
children: [
|
||||
Center(
|
||||
child: Text(
|
||||
FFLocalizations.of(context)
|
||||
.getVariableText(ptText: "Nenhuma encomenda encontrada!", enText: "No orders found!"),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Nenhuma encomenda encontrada!",
|
||||
enText: "No orders found!"),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -11,6 +11,7 @@ import 'package:hub/pages/pets_page/pets_page_model.dart';
|
|||
import 'package:hub/shared/helpers/base_storage.dart';
|
||||
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:hub/shared/utils/log_util.dart';
|
||||
|
||||
class PetsHistoryScreen extends StatefulWidget {
|
||||
|
@ -57,70 +58,79 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
|
|||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Scaffold(
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
appBar: widget.isApp ? _appBar(context) : null,
|
||||
body: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
if (_hasData == false && _pageNumber <= 1 && _loading == false)
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Center(
|
||||
child: Text(FFLocalizations.of(context)
|
||||
.getVariableText(ptText: "Nenhum Pet encontrado!", enText: "No pets found")),
|
||||
)
|
||||
],
|
||||
Widget build(BuildContext context) {
|
||||
double limitedBodyTextSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedHeaderTextSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
if (_hasData == false && _pageNumber <= 1 && _loading == false)
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Center(
|
||||
child: Text(FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Nenhum Pet encontrado!",
|
||||
enText: "No pets found"),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Nunito',
|
||||
fontSize: limitedHeaderTextSize,)
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
else if (_hasData == true || _pageNumber >= 1)
|
||||
Expanded(
|
||||
child: FutureBuilder<void>(
|
||||
future: _petsFuture,
|
||||
builder: (context, snapshot) {
|
||||
return ListView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: const BouncingScrollPhysics(),
|
||||
controller: _scrollController,
|
||||
itemCount: _petsWrap.length + 1,
|
||||
itemBuilder: (context, index) {
|
||||
if (index == 0) {
|
||||
// Add your item here
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(right: 30, top: 10),
|
||||
child: Text(
|
||||
widget.model?.petAmountRegister == '0'
|
||||
? FFLocalizations.of(context).getVariableText(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 {
|
||||
final item = _petsWrap[index - 1];
|
||||
return _item(context, item);
|
||||
}
|
||||
});
|
||||
},
|
||||
)),
|
||||
if (_hasData == true && _loading == true)
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: 15, bottom: 15),
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
)
|
||||
else if (_hasData == true || _pageNumber >= 1)
|
||||
Expanded(
|
||||
child: FutureBuilder<void>(
|
||||
future: _petsFuture,
|
||||
builder: (context, snapshot) {
|
||||
return ListView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: const BouncingScrollPhysics(),
|
||||
controller: _scrollController,
|
||||
itemCount: _petsWrap.length + 1,
|
||||
itemBuilder: (context, index) {
|
||||
if (index == 0) {
|
||||
// Add your item here
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(right: 30, top: 10),
|
||||
child: Text(
|
||||
model.petAmountRegister == '0'
|
||||
? FFLocalizations.of(context)
|
||||
.getVariableText(ptText: "Ilimitado", enText: "Unlimited")
|
||||
: "${FFLocalizations.of(context).getVariableText(ptText: "Quantidade de Pets: ", enText: "Amount of Pets: ")}$count/${model.petAmountRegister}",
|
||||
textAlign: TextAlign.right,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
final item = _petsWrap[index - 1];
|
||||
return _item(context, item);
|
||||
}
|
||||
});
|
||||
},
|
||||
)),
|
||||
if (_hasData == true && _loading == true)
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: 15, bottom: 15),
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
].addToStart(const SizedBox(height: 0)),
|
||||
),
|
||||
);
|
||||
),
|
||||
),
|
||||
)
|
||||
].addToStart(const SizedBox(height: 0)),
|
||||
);
|
||||
}
|
||||
|
||||
PreferredSizeWidget _appBar(BuildContext context) {
|
||||
return AppBar(
|
||||
|
@ -209,14 +219,20 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
|
|||
void _showNoMoreDataSnackBar(BuildContext context) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content:
|
||||
Text(FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data.")),
|
||||
content: Text(
|
||||
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
|
||||
style: TextStyle(
|
||||
color :Colors.white,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||
),
|
||||
),
|
||||
duration: const Duration(seconds: 3),
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Widget _item(BuildContext context, dynamic uItem) {
|
||||
return CardItemTemplateComponentWidget(
|
||||
imagePath:
|
||||
|
|
|
@ -16,6 +16,7 @@ import 'package:hub/shared/helpers/base_storage.dart';
|
|||
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/shared/utils/image_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:hub/shared/utils/validator_util.dart';
|
||||
|
||||
class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
||||
|
@ -394,27 +395,29 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
onPressed: () async {
|
||||
context.pop();
|
||||
|
||||
model.isEditing = true;
|
||||
model.item = item;
|
||||
model.switchTab(0);
|
||||
model.setEditForm();
|
||||
// model.safeSetState!();
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 130,
|
||||
height: 40,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
elevation: 0,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
width: 1,
|
||||
),
|
||||
// borderRadius: 12,
|
||||
model.isEditing = true;
|
||||
model.item = item;
|
||||
model.switchTab(0);
|
||||
model.setEditForm();
|
||||
// model.safeSetState!();
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
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,
|
||||
),
|
||||
// borderRadius: 12,
|
||||
),
|
||||
),
|
||||
|
||||
// DELETE ACTION
|
||||
if (isInteractive)
|
||||
|
@ -445,53 +448,55 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
context.pop(value);
|
||||
context.pop(value);
|
||||
|
||||
if (value == false) {
|
||||
showSnackbar(
|
||||
context,
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Erro ao excluir pet',
|
||||
enText: 'Error deleting pet',
|
||||
),
|
||||
true,
|
||||
);
|
||||
} else if (value == true) {
|
||||
showSnackbar(
|
||||
context,
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Success deleting pet',
|
||||
ptText: 'Succeso ao excluir pet',
|
||||
),
|
||||
false,
|
||||
);
|
||||
}
|
||||
}).catchError((err, stack) {
|
||||
context.pop();
|
||||
if (value == false) {
|
||||
showSnackbar(
|
||||
context,
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Error deleting pet',
|
||||
ptText: 'Erro ao excluir pet',
|
||||
enText: 'Error deleting pet',
|
||||
),
|
||||
true,
|
||||
);
|
||||
});
|
||||
} else if (value == true) {
|
||||
showSnackbar(
|
||||
context,
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Success deleting pet',
|
||||
ptText: 'Succeso ao excluir pet',
|
||||
),
|
||||
false,
|
||||
);
|
||||
}
|
||||
}).catchError((err, stack) {
|
||||
context.pop();
|
||||
showSnackbar(
|
||||
context,
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Error deleting pet',
|
||||
ptText: 'Erro ao excluir pet',
|
||||
),
|
||||
true,
|
||||
);
|
||||
});
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 130,
|
||||
height: 40,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
elevation: 0,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
width: 1,
|
||||
),
|
||||
// borderRadius: 12,
|
||||
});
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
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,
|
||||
),
|
||||
// borderRadius: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
// 'MIN', 'PEQ', 'MED', 'GRA', 'GIG'
|
||||
labelsHashMap: Map<String, String>.from({
|
||||
|
|
|
@ -12,6 +12,7 @@ import 'package:hub/flutter_flow/form_field_controller.dart';
|
|||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/pages/pets_on_the_property_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
|
||||
|
@ -100,6 +101,10 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
|
|||
}
|
||||
|
||||
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,
|
||||
|
@ -118,200 +123,273 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedHeaderFontSize,
|
||||
),
|
||||
|
||||
),
|
||||
),
|
||||
),
|
||||
Form(
|
||||
key: _model.registerFormKey,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
child:
|
||||
Column(mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 10, 0, 20),
|
||||
child: MediaUploadButtonUtil(
|
||||
onUploadComplete: _model.handleUploadComplete,
|
||||
isUploading: _model.isDataUploading,
|
||||
uploadedFiles: _model.uploadedLocalFile,
|
||||
labelText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Clique para adicionar a foto de seu Pet', enText: 'Click to add your Pet\'s photo'),
|
||||
),
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerName,
|
||||
validator: _model.textControllerNameValidator.asValidator(context),
|
||||
focusNode: _model.textFieldFocusName,
|
||||
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name'),
|
||||
hintText: FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name'),
|
||||
suffixIcon: Symbols.format_color_text,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 80,
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerSpecies,
|
||||
validator: _model.textControllerSpeciesValidator.asValidator(context),
|
||||
focusNode: _model.textFieldFocusSpecies,
|
||||
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Espécie', enText: 'Species'),
|
||||
hintText: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Ex: Cachorro, Gato, Papagaio', enText: 'e.g. Dog, Cat, Parrot'),
|
||||
suffixIcon: Symbols.sound_detection_dog_barking,
|
||||
haveMaxLength: true,
|
||||
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,
|
||||
),
|
||||
),
|
||||
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,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 60.0,
|
||||
child: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||
child: TextFormField(
|
||||
controller: _model.textControllerData,
|
||||
focusNode: _model.textFieldFocusData,
|
||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||
readOnly: true,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
autofocus: false,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 10, 0, 20),
|
||||
child: MediaUploadButtonUtil(
|
||||
onUploadComplete: _model.handleUploadComplete,
|
||||
isUploading: _model.isDataUploading,
|
||||
uploadedFiles: _model.uploadedLocalFile,
|
||||
labelText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Clique para adicionar a foto de seu Pet',
|
||||
enText: 'Click to add your Pet\'s photo'),
|
||||
),
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerName,
|
||||
validator: _model.textControllerNameValidator
|
||||
.asValidator(context),
|
||||
focusNode: _model.textFieldFocusName,
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Nome', enText: 'Name'),
|
||||
hintText: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Nome', enText: 'Name'),
|
||||
suffixIcon: Symbols.format_color_text,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 80,
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerSpecies,
|
||||
validator: _model.textControllerSpeciesValidator
|
||||
.asValidator(context),
|
||||
focusNode: _model.textFieldFocusSpecies,
|
||||
labelText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Espécie', enText: 'Species'),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Ex: Cachorro, Gato, Papagaio',
|
||||
enText: 'e.g. Dog, Cat, Parrot'),
|
||||
suffixIcon: Symbols.sound_detection_dog_barking,
|
||||
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,
|
||||
),
|
||||
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),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 60.0,
|
||||
child: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
child: TextFormField(
|
||||
controller: _model.textControllerData,
|
||||
focusNode: _model.textFieldFocusData,
|
||||
cursorColor:
|
||||
FlutterFlowTheme.of(context).primary,
|
||||
readOnly: true,
|
||||
autovalidateMode:
|
||||
AutovalidateMode.onUserInteraction,
|
||||
autofocus: false,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintText: FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
ptText: 'Data de Nascimento',
|
||||
enText: 'Date of Birth',
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Data de Nascimento',
|
||||
enText: 'Date of Birth',
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
lineHeight: 1.0,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
lineHeight: 1.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.customColor6,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(10.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(10.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(10.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(10.0),
|
||||
),
|
||||
suffixIcon: Icon(
|
||||
Icons.date_range,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
suffixIcon: Icon(
|
||||
Icons.date_range,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
lineHeight: 1.8,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
validator: _model
|
||||
.textControllerDataValidator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
lineHeight: 1.8,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
validator: _model.textControllerDataValidator.asValidator(context),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
final pickedDate = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: getCurrentTimestamp,
|
||||
firstDate: DateTime(1990),
|
||||
lastDate: DateTime.now(),
|
||||
builder: (context, child) {
|
||||
return wrapInMaterialDatePickerTheme(
|
||||
context,
|
||||
child!,
|
||||
headerBackgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
headerForegroundColor: FlutterFlowTheme.of(context).info,
|
||||
headerTextStyle: FlutterFlowTheme.of(context).headlineLarge.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).headlineLargeFamily,
|
||||
fontSize: 32.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
|
||||
),
|
||||
pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
pickerForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||
selectedDateTimeBackgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
selectedDateTimeForegroundColor: FlutterFlowTheme.of(context).info,
|
||||
actionButtonForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||
iconSize: 24.0,
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
final pickedDate = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: getCurrentTimestamp,
|
||||
firstDate: DateTime(1990),
|
||||
lastDate: DateTime.now(),
|
||||
builder: (context, child) {
|
||||
return wrapInMaterialDatePickerTheme(
|
||||
context,
|
||||
child!,
|
||||
headerBackgroundColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
headerForegroundColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.info,
|
||||
headerTextStyle:
|
||||
FlutterFlowTheme.of(context)
|
||||
.headlineLarge
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme
|
||||
.of(context)
|
||||
.headlineLargeFamily,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.headlineLargeFamily),
|
||||
),
|
||||
pickerBackgroundColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
pickerForegroundColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
selectedDateTimeBackgroundColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
selectedDateTimeForegroundColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.info,
|
||||
actionButtonForegroundColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
iconSize: 24.0,
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
if (pickedDate != null) {
|
||||
setState(() {
|
||||
|
@ -321,132 +399,170 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
|
|||
pickedDate.day,
|
||||
);
|
||||
|
||||
_model.textControllerData = TextEditingController(
|
||||
text: dateTimeFormat(
|
||||
'dd/MM/yyyy',
|
||||
_model.selectedDate,
|
||||
locale: FFLocalizations.of(context).languageCode,
|
||||
));
|
||||
_model.textControllerData?.selection = TextSelection.collapsed(
|
||||
offset: _model.textControllerData!.text.length,
|
||||
);
|
||||
});
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 80.0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
_model.textControllerData =
|
||||
TextEditingController(
|
||||
text: dateTimeFormat(
|
||||
'dd/MM/yyyy',
|
||||
_model.selectedDate,
|
||||
locale: FFLocalizations.of(context)
|
||||
.languageCode,
|
||||
));
|
||||
_model.textControllerData?.selection =
|
||||
TextSelection.collapsed(
|
||||
offset: _model.textControllerData!
|
||||
.text.length,
|
||||
);
|
||||
});
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 80.0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(10.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0, 0.0, 15),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Selecione as opções disponíveis',
|
||||
enText: 'Select the available options',
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodySmall
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodySmallFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0, 0.0, 15),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Selecione as opções disponíveis',
|
||||
enText: 'Select the available options',
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||
child: CustomSelect(
|
||||
options: const ['MAC', 'FEM'],
|
||||
controller: _model.dropDownValueController1 ??=
|
||||
FormFieldController<String>(
|
||||
_model.dropDownValue1 ??= ''),
|
||||
isRequired: true,
|
||||
changed: (val) => safeSetState(() {
|
||||
_model.dropDownValue1 = val;
|
||||
}),
|
||||
dropDownValue: _model.dropDownValue1,
|
||||
optionsLabel: [
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Macho', enText: 'Male'),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Fêmea', enText: 'Female')
|
||||
],
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Gênero do Pet',
|
||||
enText: 'Gender of the Pet')
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||
child: CustomSelect(
|
||||
options: const ['MAC', 'FEM'],
|
||||
controller: _model.dropDownValueController1 ??=
|
||||
FormFieldController<String>(_model.dropDownValue1 ??= ''),
|
||||
isRequired: true,
|
||||
changed: (val) => safeSetState(() {
|
||||
_model.dropDownValue1 = val;
|
||||
}),
|
||||
dropDownValue: _model.dropDownValue1,
|
||||
optionsLabel: [
|
||||
FFLocalizations.of(context).getVariableText(ptText: 'Macho', enText: 'Male'),
|
||||
FFLocalizations.of(context).getVariableText(ptText: 'Fêmea', enText: 'Female')
|
||||
],
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||
child: CustomSelect(
|
||||
options: const ['MIN', 'PEQ', 'MED', 'GRA', 'GIG'],
|
||||
controller: _model.dropDownValueController2 ??=
|
||||
FormFieldController<String>(
|
||||
_model.dropDownValue2 ??= ''),
|
||||
isRequired: true,
|
||||
changed: (val) => safeSetState(() {
|
||||
_model.dropDownValue2 = val;
|
||||
}),
|
||||
dropDownValue: _model.dropDownValue2,
|
||||
optionsLabel: [
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Mini', enText: 'Mini'),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Pequeno', enText: 'Small'),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Médio', enText: 'Medium'),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Grande', enText: 'Big'),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Gigante', enText: 'Giant'),
|
||||
],
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Porte do Pet',
|
||||
enText: 'Size of the Pet')),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0, 0.0, 15),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText:
|
||||
'Você tem alguma observação sobre o seu Pet?',
|
||||
enText:
|
||||
'Do you have any observations about your Pet?',
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodySmall
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodySmallFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerObservation,
|
||||
validator: _model.textControllerObservationValidator
|
||||
.asValidator(context),
|
||||
focusNode: _model.textFieldFocusObservation,
|
||||
labelText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Escreva as suas observações aqui...',
|
||||
enText: 'Write your observations here...'),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Selecione o gênero do Pet', enText: 'Select the gender of the Pet')),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||
child: CustomSelect(
|
||||
options: const ['MIN', 'PEQ', 'MED', 'GRA', 'GIG'],
|
||||
controller: _model.dropDownValueController2 ??=
|
||||
FormFieldController<String>(_model.dropDownValue2 ??= ''),
|
||||
isRequired: true,
|
||||
changed: (val) => safeSetState(() {
|
||||
_model.dropDownValue2 = val;
|
||||
}),
|
||||
dropDownValue: _model.dropDownValue2,
|
||||
optionsLabel: [
|
||||
FFLocalizations.of(context).getVariableText(ptText: 'Mini', enText: 'Mini'),
|
||||
FFLocalizations.of(context).getVariableText(ptText: 'Pequeno', enText: 'Small'),
|
||||
FFLocalizations.of(context).getVariableText(ptText: 'Médio', enText: 'Medium'),
|
||||
FFLocalizations.of(context).getVariableText(ptText: 'Grande', enText: 'Big'),
|
||||
FFLocalizations.of(context).getVariableText(ptText: 'Gigante', enText: 'Giant'),
|
||||
],
|
||||
hintText: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Selecione o porte do Pet', enText: 'Select the size of the Pet')),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0, 0.0, 15),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Você tem alguma observação sobre o seu Pet?',
|
||||
enText: 'Do you have any observations about your Pet?',
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
ptText: 'Escreva as suas observações aqui...',
|
||||
enText: 'Write your observations here...'),
|
||||
suffixIcon: Icons.text_fields,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 250,
|
||||
),
|
||||
),
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerObservation,
|
||||
validator: _model.textControllerObservationValidator.asValidator(context),
|
||||
focusNode: _model.textFieldFocusObservation,
|
||||
labelText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Escreva as suas observações aqui...', enText: 'Write your observations here...'),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Escreva as suas observações aqui...', enText: 'Write your observations here...'),
|
||||
suffixIcon: Icons.text_fields,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 250,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(70, 20, 70, 30),
|
||||
child: SubmitButtonUtil(
|
||||
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Cadastrar', enText: 'Register'),
|
||||
onPressed: _model.isFormValid(context) ? _model.registerPet : null),
|
||||
),
|
||||
])),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(70, 20, 70, 30),
|
||||
child: SubmitButtonUtil(
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
ptText: 'Cadastrar', enText: 'Register'),
|
||||
onPressed: _model.isFormValid(context)
|
||||
? _model.registerPet
|
||||
: null),
|
||||
),
|
||||
])),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
@ -60,7 +60,7 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
|
||||
onConfirm() async {
|
||||
String content;
|
||||
String value = !isNotify ? 'N' : 'S';
|
||||
String value = !isNotify ? 'S' : 'N';
|
||||
await PhpGroup.changeNotifica
|
||||
.call(notifica: value)
|
||||
.then((value) async {
|
||||
|
|
|
@ -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:provider/provider.dart';
|
||||
|
||||
|
@ -21,6 +22,7 @@ class _PreferencesPageWidgetState extends State<PreferencesPageWidget> {
|
|||
super.initState();
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ChangeNotifierProvider<PreferencesPageModel>(
|
||||
|
@ -218,7 +220,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,
|
||||
|
|
|
@ -21,6 +21,7 @@ import 'package:hub/shared/helpers/base_storage.dart';
|
|||
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||
|
||||
import 'package:hub/shared/utils/biometric_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:percent_indicator/circular_percent_indicator.dart';
|
||||
|
||||
import 'package:qr_flutter/qr_flutter.dart';
|
||||
|
@ -99,224 +100,272 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
|||
double smallerDimension = screenWidth < screenHeight ? screenWidth : screenHeight;
|
||||
double dimension = smallerDimension * 0.75;
|
||||
double totalTimeInSeconds = 100.0;
|
||||
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: 20.0,
|
||||
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 {
|
||||
_resetAnimationAndToggleAccess();
|
||||
log('isFingerprint: ${_model.isFingerprint}');
|
||||
_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 {
|
||||
log('isFingerprint: ${_model.isFingerprint}');
|
||||
_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),
|
||||
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)
|
||||
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:
|
||||
'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,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
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,
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
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),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
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),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Expirando QR code em',
|
||||
enText: 'Expiring QR code in',
|
||||
),
|
||||
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),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
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,
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ import 'package:hub/shared/helpers/base_storage.dart';
|
|||
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||
import 'package:hub/shared/services/authentication/authentication_service.dart';
|
||||
import 'package:hub/shared/services/localization/localization_service.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class ReceptionPageWidget extends StatefulWidget {
|
||||
|
@ -56,6 +57,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);
|
||||
|
||||
StorageHelper().context = context;
|
||||
return ChangeNotifierProvider(
|
||||
create: (context) => ReceptionPageModel(),
|
||||
|
@ -70,7 +75,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: 'Falta pouco para você utilizar o FRE Access Hub...',
|
||||
|
@ -79,7 +84,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
style: FlutterFlowTheme.of(context).displayLarge.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
fontSize: 20.0,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w700,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
|
@ -88,7 +93,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:
|
||||
|
@ -98,7 +103,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||
fontFamily: 'Nunito Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
fontSize: limitedBodyFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
|
@ -118,8 +123,9 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
enText: 'My Identifier'),
|
||||
textStyle: FlutterFlowTheme.of(context).labelSmall.override(
|
||||
fontFamily: 'Nunito Sans',
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
fontSize: 10.0,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.secondaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
|
@ -130,14 +136,17 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
.getVariableText(ptText: 'Meu Identificador', enText: 'My Identifier'),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
height:30,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Nunito Sans',
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: 14.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
|
@ -154,7 +163,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();
|
||||
|
@ -165,14 +174,20 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
.getVariableText(ptText: 'Sair da Conta', enText: 'Logout'),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
height: 30,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color:
|
||||
FlutterFlowTheme.of(context).customColor1,
|
||||
textStyle: FlutterFlowTheme.of(context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: 'Nunito Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
fontSize: 14.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
|
|
|
@ -11,6 +11,7 @@ import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_p
|
|||
import 'package:hub/shared/helpers/base_storage.dart';
|
||||
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||
import 'package:hub/shared/mixins/status_mixin.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
||||
import '../../shared/utils/validator_util.dart';
|
||||
|
@ -418,6 +419,7 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel<ScheduleComplete>
|
|||
ptText: 'Cancelar',
|
||||
enText: 'Cancel',
|
||||
),
|
||||
|
||||
icon: const Icon(Icons.close),
|
||||
onPressed: () async {
|
||||
showAlertDialog(
|
||||
|
@ -475,17 +477,19 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel<ScheduleComplete>
|
|||
});
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 130,
|
||||
width: MediaQuery.of(context).size.width * 0.3,
|
||||
height: 40,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
elevation: 0,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
width: 1,
|
||||
),
|
||||
splashColor: const Color.fromARGB(132, 255, 17, 0),
|
||||
// borderRadius: 12,
|
||||
),
|
||||
),
|
||||
|
@ -508,17 +512,19 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel<ScheduleComplete>
|
|||
switchTab(0);
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 130,
|
||||
width: MediaQuery.of(context).size.width * 0.5,
|
||||
height: 40,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
elevation: 0,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
width: 1,
|
||||
),
|
||||
splashColor: const Color.fromARGB(137, 134, 134, 134),
|
||||
// borderRadius: 12,
|
||||
),
|
||||
),
|
||||
|
@ -541,17 +547,19 @@ URL do Convite: https://visita.freaccess.com.br/${item['VAW_ID']}/$cliUUID/${ite
|
|||
''');
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 130,
|
||||
width: MediaQuery.of(context).size.width * 0.3,
|
||||
height: 40,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
elevation: 0,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
width: 1,
|
||||
),
|
||||
splashColor: const Color.fromARGB(136, 97, 160, 255),
|
||||
// borderRadius: 12,
|
||||
),
|
||||
),
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -9,6 +9,7 @@ import 'package:hub/shared/helpers/base_storage.dart';
|
|||
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||
import 'package:hub/shared/mixins/status_mixin.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';
|
||||
|
||||
|
@ -116,6 +117,10 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
|
|||
SnackBar(
|
||||
content: Text(
|
||||
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||
),
|
||||
),
|
||||
duration: const Duration(seconds: 3),
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
|
@ -125,6 +130,9 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
|
@ -137,7 +145,13 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
|
|||
children: [
|
||||
Center(
|
||||
child: Text(FFLocalizations.of(context)
|
||||
.getVariableText(ptText: "Nenhuma visita encontrada!", enText: "No visit found")),
|
||||
.getVariableText(ptText: "Nenhuma visita encontrada!", enText: "No visit found"),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
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';
|
||||
|
@ -17,7 +18,8 @@ class AtomTermsOfUse extends StatelessWidget {
|
|||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(
|
||||
context),
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
static double getNoResizeFont(BuildContext context, double baseFontSize) {
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double noscaledFontSize = baseFontSize / textScaler.scale(1);
|
||||
return noscaledFontSize;
|
||||
}
|
||||
|
||||
static double getScaledSizedBoxSize(BuildContext context, double baseFontSize, double maxFontSize, double sizeIfExceeded, double sizeIfNotExceeded) {
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -1,14 +1,17 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
|
||||
import '../../flutter_flow/flutter_flow_theme.dart';
|
||||
|
||||
class SnackBarUtil {
|
||||
static void showSnackBar(BuildContext context, String text, {bool isError = false}) {
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
text,
|
||||
style: TextStyle(color: FlutterFlowTheme.of(context).info),
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(color: FlutterFlowTheme.of(context).info, fontSize: limitedBodyFontSize),
|
||||
),
|
||||
backgroundColor: isError ? FlutterFlowTheme.of(context).error : FlutterFlowTheme.of(context).success,
|
||||
duration: const Duration(seconds: 3),
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class TextUtil extends StatelessWidget {
|
||||
final String text;
|
||||
final TextStyle? style;
|
||||
final TextAlign? textAlign;
|
||||
|
||||
const TextUtil({
|
||||
Key? key,
|
||||
required this.text,
|
||||
this.style,
|
||||
this.textAlign,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var textScale = MediaQuery.textScalerOf(context);
|
||||
var scaledTextSize = textScale.scale(style?.fontSize ?? 14);
|
||||
double limitedTextSize = scaledTextSize > (style?.fontSize ?? 14) * 2
|
||||
? (style?.fontSize ?? 14) * 2
|
||||
: scaledTextSize;
|
||||
|
||||
return Text(
|
||||
text,
|
||||
style: style?.copyWith(
|
||||
fontSize: limitedTextSize,
|
||||
),
|
||||
textAlign: textAlign ?? TextAlign.start,
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue