Merge pull request #64 from FRE-Informatica/fd-913
Acessibilidade no APP - Suporte para fontes grandes
This commit is contained in:
commit
e36df19108
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
"editor.quickSuggestions": {
|
"editor.quickSuggestions": {
|
||||||
"comments": "off",
|
"comments": "off",
|
||||||
"strings": "off",
|
"strings": "off",
|
||||||
"other": "off"
|
"other": "off"
|
||||||
}
|
},
|
||||||
|
"java.configuration.updateBuildConfiguration": "automatic"
|
||||||
}
|
}
|
|
@ -31,6 +31,11 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
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(
|
return InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -46,8 +51,8 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
|
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 120.0,
|
width: 300,
|
||||||
height: 100.0,
|
height: 280,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
|
@ -95,7 +100,7 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
||||||
style: FlutterFlowTheme.of(context).titleLarge.override(
|
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||||
fontFamily: 'Nunito',
|
fontFamily: 'Nunito',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: limitedFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||||
|
|
|
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
|
|
||||||
// ignore: must_be_immutable
|
// ignore: must_be_immutable
|
||||||
class CustomInputUtil extends StatefulWidget {
|
class CustomInputUtil extends StatefulWidget {
|
||||||
|
@ -48,6 +49,8 @@ class _CustomInputUtilState extends State<CustomInputUtil> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
double limitedInputTextSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 10.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 10.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
@ -81,6 +84,7 @@ class _CustomInputUtilState extends State<CustomInputUtil> {
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
),
|
),
|
||||||
|
fontSize: limitedInputTextSize,
|
||||||
),
|
),
|
||||||
hintText: widget.hintText,
|
hintText: widget.hintText,
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
|
@ -90,6 +94,11 @@ class _CustomInputUtilState extends State<CustomInputUtil> {
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
),
|
),
|
||||||
|
fontSize: limitedInputTextSize,
|
||||||
|
),
|
||||||
|
helperStyle: TextStyle(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
fontSize: limitedInputTextSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -112,6 +121,11 @@ class _CustomInputUtilState extends State<CustomInputUtil> {
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
),
|
),
|
||||||
|
errorStyle: TextStyle(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
fontSize: limitedInputTextSize,
|
||||||
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
@ -131,6 +145,7 @@ class _CustomInputUtilState extends State<CustomInputUtil> {
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
),
|
),
|
||||||
|
fontSize: limitedInputTextSize,
|
||||||
),
|
),
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
maxLength: widget.haveMaxLength ? widget.maxLength : 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_theme.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'package:hub/flutter_flow/form_field_controller.dart';
|
import 'package:hub/flutter_flow/form_field_controller.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
|
|
||||||
// ignore: must_be_immutable
|
// ignore: must_be_immutable
|
||||||
class CustomSelect extends StatefulWidget {
|
class CustomSelect extends StatefulWidget {
|
||||||
|
@ -40,6 +41,9 @@ class _CustomSelectState extends State<CustomSelect> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0, 0.0, 0, 10.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0, 0.0, 0, 10.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
@ -68,6 +72,7 @@ class _CustomSelectState extends State<CustomSelect> {
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintText: widget.hintText,
|
hintText: widget.hintText,
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
@ -110,6 +115,7 @@ class _CustomSelectState extends State<CustomSelect> {
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
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_util.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||||
import 'package:hub/flutter_flow/upload_data.dart';
|
import 'package:hub/flutter_flow/upload_data.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
|
|
||||||
// ignore: must_be_immutable
|
// ignore: must_be_immutable
|
||||||
class MediaUploadButtonUtil extends StatefulWidget {
|
class MediaUploadButtonUtil extends StatefulWidget {
|
||||||
|
@ -32,139 +33,175 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Padding(
|
double limitedInputTextSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
bool _isLoading = false;
|
||||||
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>[];
|
|
||||||
|
|
||||||
try {
|
return Builder(
|
||||||
final message = FFLocalizations.of(context)
|
builder: (context) {
|
||||||
.getVariableText(enText: 'Uploading file...', ptText: 'Enviando arquivo...');
|
if (widget.uploadedFiles != null &&
|
||||||
showUploadMessage(
|
widget.uploadedFiles!.bytes!.isNotEmpty) {
|
||||||
context,
|
{
|
||||||
message,
|
return InkWell(
|
||||||
showLoading: true,
|
splashColor: Colors.transparent,
|
||||||
);
|
focusColor: Colors.transparent,
|
||||||
selectedUploadedFiles = selectedMedia
|
hoverColor: Colors.transparent,
|
||||||
.map((m) => FFUploadedFile(
|
highlightColor: Colors.transparent,
|
||||||
name: m.storagePath.split('/').last,
|
onTap: () async {
|
||||||
bytes: m.bytes,
|
setState(() {
|
||||||
height: m.dimensions?.height,
|
widget.isUploading = false;
|
||||||
width: m.dimensions?.width,
|
widget.uploadedFiles =
|
||||||
// blurHash: m.blurHash,
|
FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||||
))
|
widget.onUploadComplete(widget.uploadedFiles!);
|
||||||
.toList();
|
});
|
||||||
} finally {
|
},
|
||||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
child: ClipRRect(
|
||||||
widget.isUploading = false;
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
}
|
child: Image.memory(
|
||||||
if (selectedUploadedFiles.length == selectedMedia.length) {
|
widget.uploadedFiles!.bytes ?? Uint8List.fromList([]),
|
||||||
setState(() {
|
width: 300.0,
|
||||||
widget.uploadedFiles = selectedUploadedFiles.first;
|
height: 200.0,
|
||||||
});
|
fit: BoxFit.cover,
|
||||||
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),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
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:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
|
|
||||||
// ignore: must_be_immutable
|
// ignore: must_be_immutable
|
||||||
class TabViewUtil extends StatelessWidget {
|
class TabViewUtil extends StatelessWidget {
|
||||||
|
@ -38,7 +39,7 @@ class TabViewUtil extends StatelessWidget {
|
||||||
unselectedLabelColor: FlutterFlowTheme.of(context).primaryText,
|
unselectedLabelColor: FlutterFlowTheme.of(context).primaryText,
|
||||||
labelStyle: FlutterFlowTheme.of(context).titleMedium.override(
|
labelStyle: FlutterFlowTheme.of(context).titleMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).titleMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).titleMediumFamily,
|
||||||
fontSize: 13.0,
|
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleMediumFamily),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:fluttertoast/fluttertoast.dart';
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
|
|
||||||
class ToastUtil {
|
class ToastUtil {
|
||||||
static void showToast({
|
static void showToast({
|
||||||
|
@ -8,7 +9,7 @@ class ToastUtil {
|
||||||
Toast toastLength = Toast.LENGTH_SHORT,
|
Toast toastLength = Toast.LENGTH_SHORT,
|
||||||
Color backgroundColor = Colors.black,
|
Color backgroundColor = Colors.black,
|
||||||
Color textColor = Colors.white,
|
Color textColor = Colors.white,
|
||||||
double fontSize = 16.0,
|
double fontSize = 16,
|
||||||
}) {
|
}) {
|
||||||
Fluttertoast.showToast(
|
Fluttertoast.showToast(
|
||||||
msg: message,
|
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_theme.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
|
|
||||||
class OptModalWidget extends StatefulWidget {
|
class OptModalWidget extends StatefulWidget {
|
||||||
final String defaultPersonType;
|
final String defaultPersonType;
|
||||||
|
@ -77,7 +78,9 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
context.pop(filterResult);
|
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(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
|
@ -91,7 +94,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
fontSize: fontsize,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
@ -112,7 +115,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontSize: fontsize,
|
fontSize: limitedInputFontSize,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
),
|
),
|
||||||
|
@ -166,6 +169,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double screenWidth = MediaQuery.of(context).size.width;
|
double screenWidth = MediaQuery.of(context).size.width;
|
||||||
|
|
||||||
|
|
||||||
return Center(
|
return Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: screenWidth - (screenWidth * 0.35),
|
width: screenWidth - (screenWidth * 0.35),
|
||||||
|
@ -189,7 +193,8 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 18.0,
|
fontSize: LimitedFontSizeUtil.getHeaderFontSize(
|
||||||
|
context),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
|
@ -218,7 +223,15 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
foregroundColor: FlutterFlowTheme.of(context).info,
|
foregroundColor: FlutterFlowTheme.of(context).info,
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
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';
|
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||||
// ignore: unused_import
|
// ignore: unused_import
|
||||||
|
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
|
|
||||||
class OrderFilterModalWidget extends StatefulWidget {
|
class OrderFilterModalWidget extends StatefulWidget {
|
||||||
final String defaultAdresseeType;
|
final String defaultAdresseeType;
|
||||||
final String defaultStatus;
|
final String defaultStatus;
|
||||||
|
@ -169,6 +171,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double screenWidth = MediaQuery.of(context).size.width;
|
double screenWidth = MediaQuery.of(context).size.width;
|
||||||
|
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
|
|
||||||
return Center(
|
return Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
|
@ -210,8 +213,9 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
_buildCheckboxListTile('adresseeType', adresseeTypeOptions, 14),
|
_buildCheckboxListTile(
|
||||||
_buildCheckboxListTile('status', statusOptions, 14),
|
'adresseeType', adresseeTypeOptions, limitedBodyFontSize),
|
||||||
|
_buildCheckboxListTile('status', statusOptions, limitedBodyFontSize),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -223,7 +227,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
foregroundColor: FlutterFlowTheme.of(context).info,
|
foregroundColor: FlutterFlowTheme.of(context).info,
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
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:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/shared/enums/enum_throw_exception.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_animations.dart';
|
||||||
import '/flutter_flow/flutter_flow_theme.dart';
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
@ -91,75 +92,76 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
|
||||||
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
@override Widget build(BuildContext context) {
|
||||||
@override
|
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
Widget build(BuildContext context) {
|
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
return InkWell(
|
return InkWell(
|
||||||
key: const ValueKey('ThrowExceptionWidget'),
|
key: const ValueKey('ThrowExceptionWidget'),
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
hoverColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
context.pop();
|
context.pop();
|
||||||
},
|
},
|
||||||
child: DecoratedBox(
|
child: DecoratedBox(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
borderRadius: BorderRadius.circular(20.0), // Ajuste o valor conforme necessário
|
borderRadius: BorderRadius.circular(20.0), // Ajuste o valor conforme necessário
|
||||||
),
|
),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 20.0),
|
const SizedBox(height: 20.0),
|
||||||
Stack(
|
Stack(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
_getIconByType(context),
|
_getIconByType(context),
|
||||||
color: _getColorByType(context),
|
color: _getColorByType(context),
|
||||||
size: 150.0,
|
size: 150.0,
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
).animateOnPageLoad(animationsMap['stackOnPageLoadAnimation']!),
|
],
|
||||||
const SizedBox(height: 20.0),
|
).animateOnPageLoad(animationsMap['stackOnPageLoadAnimation']!),
|
||||||
Column(
|
const SizedBox(height: 20.0),
|
||||||
mainAxisSize: MainAxisSize.max,
|
Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
Text(
|
children: [
|
||||||
_getTitleByType(context),
|
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(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
fontSize: 20.0,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
useGoogleFonts:
|
fontSize: limitedBodyFontSize,
|
||||||
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'),
|
],
|
||||||
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/base_storage.dart';
|
||||||
import 'package:hub/shared/helpers/storage_helper.dart';
|
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
import 'package:hub/shared/utils/log_util.dart';
|
import 'package:hub/shared/utils/log_util.dart';
|
||||||
|
|
||||||
import '../../../shared/services/authentication/authentication_service.dart';
|
import '../../../shared/services/authentication/authentication_service.dart';
|
||||||
|
@ -52,7 +53,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
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),
|
duration: const Duration(seconds: 3),
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
|
|
@ -56,6 +56,11 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
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(
|
return Container(
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: Align(
|
child: Align(
|
||||||
|
@ -85,8 +90,8 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
|
||||||
hoverColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await LocalizationService.selectLocal(context)
|
await LocalizationService.selectLocal(context).then(
|
||||||
.then((value) => value == true ? onUpdate() : null);
|
(value) => value == true ? onUpdate() : null);
|
||||||
},
|
},
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(200.0),
|
borderRadius: BorderRadius.circular(200.0),
|
||||||
|
@ -113,22 +118,36 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Expanded(
|
||||||
valueOrDefault<String>(
|
child: Tooltip(
|
||||||
functions.convertToUppercase(_model.cliName),
|
message: valueOrDefault<String>(
|
||||||
FFLocalizations.of(context).getVariableText(
|
functions.convertToUppercase(_model.cliName),
|
||||||
ptText: 'SEM LOCAL VINCULADO',
|
FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'NO LINKED LOCAL',
|
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))
|
.divide(const SizedBox(width: 20.0))
|
||||||
|
|
|
@ -50,12 +50,16 @@ class _MenuStaggeredViewComponentWidgetState extends State<MenuStaggeredViewComp
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
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(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
GridView.builder(
|
GridView.builder(
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 3,
|
crossAxisCount: crossAxisCount,
|
||||||
crossAxisSpacing: 10.0,
|
crossAxisSpacing: 10.0,
|
||||||
mainAxisSpacing: 10.0,
|
mainAxisSpacing: 10.0,
|
||||||
childAspectRatio: 1,
|
childAspectRatio: 1,
|
||||||
|
|
|
@ -3,6 +3,7 @@ import 'dart:collection';
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.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_theme.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
@ -52,6 +53,8 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _generateLabels() {
|
List<Widget> _generateLabels() {
|
||||||
|
double limitedBodyTextSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
|
|
||||||
return labelsLinkedHashMap.entries.map((entry) {
|
return labelsLinkedHashMap.entries.map((entry) {
|
||||||
final key = entry.key;
|
final key = entry.key;
|
||||||
final text = entry.value.toString();
|
final text = entry.value.toString();
|
||||||
|
@ -68,6 +71,7 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: limitedBodyTextSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
|
@ -77,7 +81,7 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
fontSize: 12.5,
|
fontSize: limitedBodyTextSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
@ -114,26 +118,30 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _generateStatus() {
|
List<Widget> _generateStatus() {
|
||||||
|
double limitedBodyTextSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
return statusLinkedHashMap.expand((statusLinked) {
|
return statusLinkedHashMap.expand((statusLinked) {
|
||||||
return statusLinked.entries.map((entry) {
|
return statusLinked.entries.map((entry) {
|
||||||
final text = entry.key;
|
final text = entry.key;
|
||||||
final color = entry.value;
|
final color = entry.value;
|
||||||
|
|
||||||
return Container(
|
return Tooltip(
|
||||||
padding: const EdgeInsets.all(5),
|
message: text,
|
||||||
width: MediaQuery.of(context).size.width * 0.25,
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
padding: const EdgeInsets.all(5),
|
||||||
color: color,
|
width: MediaQuery.of(context).size.width * 0.25,
|
||||||
borderRadius: BorderRadius.circular(5),
|
decoration: BoxDecoration(
|
||||||
),
|
color: color,
|
||||||
child: Center(
|
borderRadius: BorderRadius.circular(5),
|
||||||
child: Text(
|
),
|
||||||
text,
|
child: Center(
|
||||||
overflow: TextOverflow.ellipsis,
|
child: Text(
|
||||||
style: TextStyle(
|
text,
|
||||||
color: FlutterFlowTheme.of(context).info,
|
overflow: TextOverflow.ellipsis,
|
||||||
fontSize: 12,
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
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/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_theme.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
|
|
||||||
|
|
||||||
class DetailsComponentWidget extends StatefulWidget {
|
class DetailsComponentWidget extends StatefulWidget {
|
||||||
const DetailsComponentWidget({
|
const DetailsComponentWidget({
|
||||||
|
@ -58,7 +60,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// CachedNetworkImage.evictFromCache(widget.imagePath ?? '');
|
// CachedNetworkImage.evictFromCache(widget.imagePath ?? '');
|
||||||
|
final double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
return Container(
|
return Container(
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
maxWidth: MediaQuery.of(context).size.width,
|
maxWidth: MediaQuery.of(context).size.width,
|
||||||
|
@ -124,6 +126,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
),
|
),
|
||||||
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
@ -132,6 +135,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
),
|
),
|
||||||
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
errorBorder: InputBorder.none,
|
errorBorder: InputBorder.none,
|
||||||
|
@ -148,6 +152,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
),
|
),
|
||||||
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
|
@ -171,6 +176,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
return TextFormField(
|
return TextFormField(
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
initialValue: '$value',
|
initialValue: '$value',
|
||||||
|
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
@ -178,8 +184,11 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
),
|
),
|
||||||
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
|
||||||
labelText: key,
|
labelText: key,
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
@ -196,9 +205,14 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
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,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
|
|
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/shared/services/authentication/authentication_service.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 'package:hub/shared/utils/validator_util.dart';
|
||||||
|
|
||||||
import '/flutter_flow/flutter_flow_theme.dart';
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
@ -48,223 +49,258 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||||
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
|
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
|
|
||||||
return Align(
|
return Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||||
child: Container(
|
child: SingleChildScrollView(
|
||||||
width: double.infinity,
|
child: Container(
|
||||||
height: 300.0,
|
width: double.infinity,
|
||||||
constraints: const BoxConstraints(
|
constraints: const BoxConstraints(
|
||||||
maxWidth: 570.0,
|
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),
|
|
||||||
),
|
),
|
||||||
),
|
decoration: BoxDecoration(
|
||||||
child: Column(
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
mainAxisSize: MainAxisSize.max,
|
borderRadius: const BorderRadius.only(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
bottomLeft: Radius.circular(0.0),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
bottomRight: Radius.circular(0.0),
|
||||||
children: [
|
topLeft: Radius.circular(15.0),
|
||||||
if (responsiveVisibility(
|
topRight: Radius.circular(15.0),
|
||||||
context: context,
|
),
|
||||||
phone: false,
|
),
|
||||||
tablet: false,
|
child: Padding(
|
||||||
))
|
padding: const EdgeInsets.fromLTRB(0, 25, 0, 25),
|
||||||
Padding(
|
child: Column(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
mainAxisSize: MainAxisSize.max,
|
||||||
child: InkWell(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
key: const ValueKey<String>('BackButton'),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
splashColor: Colors.transparent,
|
children: [
|
||||||
focusColor: Colors.transparent,
|
if (responsiveVisibility(
|
||||||
hoverColor: Colors.transparent,
|
context: context,
|
||||||
highlightColor: Colors.transparent,
|
phone: false,
|
||||||
onTap: () async {
|
tablet: false,
|
||||||
context.safePop();
|
))
|
||||||
},
|
Padding(
|
||||||
child: Row(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
mainAxisSize: MainAxisSize.max,
|
16.0, 0.0, 16.0, 8.0),
|
||||||
children: [
|
child: InkWell(
|
||||||
const Padding(
|
key: const ValueKey<String>('BackButton'),
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
splashColor: Colors.transparent,
|
||||||
child: Icon(
|
focusColor: Colors.transparent,
|
||||||
Icons.arrow_back_rounded,
|
hoverColor: Colors.transparent,
|
||||||
color: Color(0xFF15161E),
|
highlightColor: Colors.transparent,
|
||||||
size: 24.0,
|
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(
|
Padding(
|
||||||
'',
|
padding:
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
child: Text(
|
||||||
color: const Color(0xFF15161E),
|
FFLocalizations.of(context)
|
||||||
fontSize: 14.0,
|
.getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
|
||||||
letterSpacing: 0.0,
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontWeight: FontWeight.w500,
|
fontFamily: 'Outfit',
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
),
|
fontSize: limitedHeaderFontSize,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey('Outfit'),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Padding(
|
||||||
Padding(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
16.0, 4.0, 16.0, 4.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
|
FFLocalizations.of(context).getText(
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
'wu2f7yzo' /* Não se preucupe nós vamos te a... */),
|
||||||
fontFamily: 'Outfit',
|
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
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(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: limitedSubHeaderFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
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),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Form(
|
||||||
),
|
key: _model.formKey,
|
||||||
Align(
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
child: Padding(
|
||||||
child: Padding(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
16.0, 12.0, 16.0, 0.0),
|
||||||
child: FFButtonWidget(
|
child: SizedBox(
|
||||||
key: const ValueKey<String>('SendButtonWidget'),
|
width: double.infinity,
|
||||||
onPressed: (_model.emailAddressTextController.text == '' ||
|
child: TextFormField(
|
||||||
!ValidatorUtil.isValidEmail(_model.emailAddressTextController.text))
|
key: const ValueKey<String>('recoveryTextFormField'),
|
||||||
? null
|
controller: _model.emailAddressTextController,
|
||||||
: () async =>
|
focusNode: _model.emailAddressFocusNode,
|
||||||
AuthenticationService.forgotPassword(context, _model.emailAddressTextController.text),
|
onChanged: (_) => EasyDebounce.debounce(
|
||||||
text: FFLocalizations.of(context).getText(
|
'_model.emailAddressTextController',
|
||||||
'74rnd5bu' /* Enviar */,
|
const Duration(milliseconds: 500),
|
||||||
),
|
() => setState(() {}),
|
||||||
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'),
|
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
autofocus: true,
|
||||||
borderSide: const BorderSide(
|
autofillHints: const [AutofillHints.email],
|
||||||
color: Colors.transparent,
|
obscureText: false,
|
||||||
width: 1.0,
|
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/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_theme.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
|
|
||||||
class MessageNotificationModalTemplateComponentWidget extends StatefulWidget {
|
class MessageNotificationModalTemplateComponentWidget extends StatefulWidget {
|
||||||
const MessageNotificationModalTemplateComponentWidget({
|
const MessageNotificationModalTemplateComponentWidget({
|
||||||
|
@ -57,6 +58,9 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
|
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
width: MediaQuery.sizeOf(context).width,
|
width: MediaQuery.sizeOf(context).width,
|
||||||
height: MediaQuery.sizeOf(context).height,
|
height: MediaQuery.sizeOf(context).height,
|
||||||
|
@ -94,12 +98,14 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -115,6 +121,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
|
@ -145,6 +152,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
@ -152,6 +160,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -197,12 +206,14 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -218,6 +229,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
|
|
|
@ -5,6 +5,7 @@ import 'package:flutter/services.dart';
|
||||||
import 'package:google_fonts/google_fonts.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/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
import 'package:hub/shared/utils/log_util.dart';
|
import 'package:hub/shared/utils/log_util.dart';
|
||||||
|
|
||||||
import '/backend/api_requests/api_calls.dart';
|
import '/backend/api_requests/api_calls.dart';
|
||||||
|
@ -38,6 +39,11 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
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(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
onTap: () => FocusScope.of(context).unfocus(),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
|
@ -63,9 +69,13 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText('uj8acuab'),
|
FFLocalizations.of(context).getText('uj8acuab'),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
overflow: TextOverflow.clip,
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
style: FlutterFlowTheme.of(context)
|
||||||
fontSize: 16.0,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
fontSize: limitedHeaderFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
|
@ -93,7 +103,10 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
fontSize: limitedSubHeaderFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -139,16 +152,32 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
memCacheHeight: 35,
|
memCacheHeight: 35,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Expanded(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(15.0, 0.0, 0.0, 0.0),
|
child: Padding(
|
||||||
child: Text(
|
padding: const EdgeInsetsDirectional
|
||||||
model.cliName,
|
.fromSTEB(15.0, 0.0, 0.0, 0.0),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
child: Text(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
model.cliName,
|
||||||
letterSpacing: 0.0,
|
overflow: TextOverflow.ellipsis,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
maxLines: 1,
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
style:
|
||||||
),
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
fontSize: limitedBodyFontSize,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -176,7 +205,10 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
fontSize: limitedSubHeaderFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -210,6 +242,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
@ -217,6 +250,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -255,8 +290,14 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
|
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
|
@ -298,6 +339,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -337,6 +380,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
|
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
validator: model.dateTimeTextControllerValidator.asValidator(context),
|
validator: model.dateTimeTextControllerValidator.asValidator(context),
|
||||||
|
@ -479,6 +524,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: model.notesTextController,
|
controller: model.notesTextController,
|
||||||
focusNode: model.notesFocusNode,
|
focusNode: model.notesFocusNode,
|
||||||
|
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
showCursor: true,
|
showCursor: true,
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -486,13 +532,44 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getText('cw8b3tbb'),
|
counterStyle: FlutterFlowTheme
|
||||||
labelStyle: FlutterFlowTheme.of(context).bodyMedium.override(
|
.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyText1
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
@ -500,6 +577,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -540,6 +618,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
|
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: 3,
|
maxLines: 3,
|
||||||
|
@ -605,10 +685,12 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
showLoadingIndicator: true,
|
showLoadingIndicator: true,
|
||||||
text: FFLocalizations.of(context).getText('bv5fg9sv'),
|
text: FFLocalizations.of(context).getText('bv5fg9sv'),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 150.0,
|
|
||||||
height: 50.0,
|
height: 30.0 * MediaQuery.textScalerOf(context).scale(1),
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
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,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
|
@ -616,7 +698,9 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
|
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
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_theme.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
@ -50,13 +51,16 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
return Align(
|
return Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 300.0,
|
height: 300 * MediaQuery.textScalerOf(context).scale(1),
|
||||||
constraints: const BoxConstraints(
|
constraints: const BoxConstraints(
|
||||||
|
minHeight: 300.0,
|
||||||
maxWidth: 570.0,
|
maxWidth: 570.0,
|
||||||
|
maxHeight: 500,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
@ -67,95 +71,103 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
topRight: Radius.circular(15.0),
|
topRight: Radius.circular(15.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: SingleChildScrollView(
|
||||||
mainAxisSize: MainAxisSize.max,
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisSize: MainAxisSize.max,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
// This row exists for when the "app bar" is hidden on desktop, having a way back for the user can work well.
|
children: [
|
||||||
if (responsiveVisibility(
|
// This row exists for when the "app bar" is hidden on desktop, having a way back for the user can work well.
|
||||||
context: context,
|
if (responsiveVisibility(
|
||||||
phone: false,
|
context: context,
|
||||||
tablet: false,
|
phone: false,
|
||||||
))
|
tablet: false,
|
||||||
Padding(
|
))
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
Padding(
|
||||||
child: InkWell(
|
padding:
|
||||||
splashColor: Colors.transparent,
|
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||||
focusColor: Colors.transparent,
|
child: InkWell(
|
||||||
hoverColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
onTap: () async {
|
hoverColor: Colors.transparent,
|
||||||
context.safePop();
|
highlightColor: Colors.transparent,
|
||||||
},
|
onTap: () async {
|
||||||
child: Row(
|
context.safePop();
|
||||||
mainAxisSize: MainAxisSize.max,
|
},
|
||||||
children: [
|
child: Row(
|
||||||
const Padding(
|
mainAxisSize: MainAxisSize.max,
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
children: [
|
||||||
child: Icon(
|
const Padding(
|
||||||
Icons.arrow_back_rounded,
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
color: Color(0xFF15161E),
|
0.0, 12.0, 0.0, 12.0),
|
||||||
size: 24.0,
|
child: Icon(
|
||||||
|
Icons.arrow_back_rounded,
|
||||||
|
color: Color(0xFF15161E),
|
||||||
|
size: 24.0,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
Padding(
|
||||||
Padding(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
12.0, 0.0, 0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'',
|
'',
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style:
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
color: const Color(0xFF15161E),
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
fontSize: 14.0,
|
color: const Color(0xFF15161E),
|
||||||
letterSpacing: 0.0,
|
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 16, 16, 14),
|
||||||
fontWeight: FontWeight.w500,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
fontWeight: FontWeight.w500,
|
||||||
),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey('Plus Jakarta Sans'),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Padding(
|
||||||
Padding(
|
padding:
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
const EdgeInsetsDirectional.fromSTEB(16.0, 10.0, 0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'h1xilful' /* DIGITE A SUA SENHA */,
|
'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(
|
padding:
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'ujodm2ci' /* Para gerar o QR Code digite a ... */,
|
'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(
|
||||||
Form(
|
key: _model.formKey,
|
||||||
key: _model.formKey,
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
child: Padding(
|
||||||
child: Padding(
|
padding:
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||||
child: SizedBox(
|
|
||||||
width: double.infinity,
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.keyTextFieldTextController,
|
controller: _model.keyTextFieldTextController,
|
||||||
focusNode: _model.keyTextFieldFocusNode,
|
focusNode: _model.keyTextFieldFocusNode,
|
||||||
|
@ -174,25 +186,30 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'rfqrdet7' /* Senha */,
|
'rfqrdet7' /* Senha */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle:
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
fontSize: 14.0,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||||
fontWeight: FontWeight.w500,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
fontWeight: FontWeight.w500,
|
||||||
),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey('Plus Jakarta Sans'),
|
||||||
|
|
||||||
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText: FFLocalizations.of(context).getText(
|
||||||
'zz1haydj' /* digite a sua senha..... */,
|
'zz1haydj' /* digite a sua senha..... */,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle:
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
fontSize: 14.0,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||||
fontWeight: FontWeight.w500,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
fontWeight: FontWeight.w500,
|
||||||
),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey('Plus Jakarta Sans'),
|
||||||
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -239,7 +256,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
|
@ -256,49 +273,54 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Align(
|
||||||
Align(
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
child: Padding(
|
||||||
child: Padding(
|
padding:
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 15),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (_model.formKey.currentState == null || !_model.formKey.currentState!.validate()) {
|
if (_model.formKey.currentState == null ||
|
||||||
return;
|
!_model.formKey.currentState!.validate()) {
|
||||||
}
|
return;
|
||||||
await widget.toggleActionStatus?.call(
|
}
|
||||||
_model.keyTextFieldTextController.text,
|
await widget.toggleActionStatus?.call(
|
||||||
);
|
_model.keyTextFieldTextController.text,
|
||||||
context.pop();
|
);
|
||||||
},
|
context.pop();
|
||||||
text: FFLocalizations.of(context).getText(
|
},
|
||||||
'2cybbi5p' /* Enviar */,
|
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,
|
|
||||||
),
|
),
|
||||||
|
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,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,8 +2,10 @@ import 'package:easy_debounce/easy_debounce.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:google_fonts/google_fonts.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/dialog_util.dart';
|
||||||
import 'package:hub/shared/utils/image_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:hub/shared/utils/validator_util.dart';
|
||||||
import 'package:rxdart/rxdart.dart';
|
import 'package:rxdart/rxdart.dart';
|
||||||
|
|
||||||
|
@ -30,7 +32,7 @@ class RegisiterVistorTemplateComponentWidget extends StatefulWidget {
|
||||||
|
|
||||||
class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistorTemplateComponentWidget> {
|
class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistorTemplateComponentWidget> {
|
||||||
late RegisiterVistorTemplateComponentModel _model;
|
late RegisiterVistorTemplateComponentModel _model;
|
||||||
|
bool _isLoading = false;
|
||||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
|
||||||
bool _isVisitorRegistered = false;
|
bool _isVisitorRegistered = false;
|
||||||
|
@ -112,6 +114,11 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
|
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
|
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||||
|
|
||||||
return Align(
|
return Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
|
@ -137,17 +144,20 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
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(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'zazj5d8b' /* Preencha o formulário com os d... */,
|
'zazj5d8b' /* Preencha o formulário com os d... */,
|
||||||
),
|
),
|
||||||
|
overflow: TextOverflow.clip,
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedHeaderFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -178,13 +188,18 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle:
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
letterSpacing: 0.0,
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
useGoogleFonts:
|
.labelMediumFamily,
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
letterSpacing: 0.0,
|
||||||
),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).customColor6,
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
|
@ -206,6 +221,10 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
),
|
),
|
||||||
|
errorStyle: TextStyle(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
@ -222,8 +241,9 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
_model.debounce(() async {
|
_model.debounce(() async {
|
||||||
|
@ -258,7 +278,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
color: Theme.of(context).brightness == Brightness.dark
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
? Color.alphaBlend(Colors.white.withOpacity(0.7), Colors.red)
|
? Color.alphaBlend(Colors.white.withOpacity(0.7), Colors.red)
|
||||||
: Color.alphaBlend(Colors.black.withOpacity(0.25), Colors.red),
|
: Color.alphaBlend(Colors.black.withOpacity(0.25), Colors.red),
|
||||||
fontSize: 13.0,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
|
@ -293,6 +313,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
@ -300,6 +321,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -322,6 +344,10 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
),
|
),
|
||||||
|
errorStyle: TextStyle(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
@ -340,6 +366,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
maxLength: 80,
|
maxLength: 80,
|
||||||
|
@ -371,9 +398,11 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText: FFLocalizations.of(context).getVariableText(
|
||||||
'pmezihb4' /* Selecione... */,
|
enText: 'Visitor Type',
|
||||||
|
ptText: 'Tipo de Visitante',
|
||||||
),
|
),
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.keyboard_arrow_down_rounded,
|
Icons.keyboard_arrow_down_rounded,
|
||||||
|
@ -399,8 +428,8 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
padding: const EdgeInsetsDirectional.only(top: 5, start: 15),
|
padding: const EdgeInsetsDirectional.only(top: 5, start: 15),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'This field is required',
|
enText: 'Select the type of visitor',
|
||||||
ptText: 'Este campo é obrigatório',
|
ptText: 'Selecione o tipo de visitante',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
||||||
|
@ -408,6 +437,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
.containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -443,118 +473,21 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Align(
|
MediaUploadButtonUtil(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
onUploadComplete: (uploadedFile) {
|
||||||
child: FFButtonWidget(
|
setState(() {
|
||||||
onPressed: () async {
|
_model.uploadedLocalFile = uploadedFile;
|
||||||
final selectedMedia = await selectMediaWithSourceBottomSheetandFaceDetection(
|
});
|
||||||
context: context,
|
},
|
||||||
// maxWidth: 300.00,
|
isUploading: _model.isDataUploading,
|
||||||
// maxHeight: 300.00,
|
labelText: FFLocalizations.of(context).getText(
|
||||||
imageQuality: 100,
|
'p4ftwxcy' /* Selecione uma foto */,
|
||||||
allowPhoto: true,
|
),
|
||||||
includeDimensions: true,
|
uploadedFiles: _model.uploadedLocalFile,
|
||||||
);
|
),
|
||||||
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),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -573,6 +506,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedSubHeaderFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -606,6 +540,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
@ -613,6 +548,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -653,6 +589,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
// validator:
|
// validator:
|
||||||
// _model.textController3Validator.asValidator(context),
|
// _model.textController3Validator.asValidator(context),
|
||||||
|
@ -685,6 +622,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
@ -692,6 +630,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -732,6 +671,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType.emailAddress,
|
||||||
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
||||||
|
@ -778,7 +718,11 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Visitante cadastrado com sucesso.',
|
ptText: 'Visitante cadastrado com sucesso.',
|
||||||
enText: 'Visitor successfully registered.'),
|
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,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
duration: const Duration(seconds: 3),
|
duration: const Duration(seconds: 3),
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
|
@ -814,8 +758,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
'okbw0aiu' /* Cadastrar */,
|
'okbw0aiu' /* Cadastrar */,
|
||||||
),
|
),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 250.0,
|
height: 30.0 * MediaQuery.textScalerOf(context).scale(1),
|
||||||
height: 36.0,
|
|
||||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(80.0, 0.0, 80.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(80.0, 0.0, 80.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.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,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.transparent,
|
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:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/components/atomic_components/shared_components_atoms/atom_image_svg_theme.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/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/base_storage.dart';
|
||||||
import 'package:hub/shared/helpers/storage_helper.dart';
|
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||||
import 'package:hub/shared/utils/validator_util.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';
|
export 'sign_up_template_component_model.dart';
|
||||||
|
|
||||||
class SignUpTemplateComponentWidget extends StatefulWidget {
|
class SignUpTemplateComponentWidget extends StatefulWidget {
|
||||||
const SignUpTemplateComponentWidget({super.key, required this.toggleSignInPage});
|
const SignUpTemplateComponentWidget(
|
||||||
|
{super.key, required this.toggleSignInPage});
|
||||||
final Future Function()? toggleSignInPage;
|
final Future Function()? toggleSignInPage;
|
||||||
@override
|
@override
|
||||||
State<SignUpTemplateComponentWidget> createState() => _SignUpTemplateComponentWidgetState();
|
State<SignUpTemplateComponentWidget> createState() => _SignUpTemplateComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
|
class _SignUpTemplateComponentWidgetState
|
||||||
|
extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
|
||||||
late SignUpTemplateComponentModel _model;
|
late SignUpTemplateComponentModel _model;
|
||||||
final animationsMap = <String, AnimationInfo>{};
|
final animationsMap = <String, AnimationInfo>{};
|
||||||
late String _deviceType;
|
late String _deviceType;
|
||||||
|
@ -104,6 +107,10 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final MediaQueryData mediaQuery = MediaQuery.of(context);
|
final MediaQueryData mediaQuery = MediaQuery.of(context);
|
||||||
final double screenWidth = mediaQuery.size.width;
|
final double screenWidth = mediaQuery.size.width;
|
||||||
|
final double screenHeight = mediaQuery.size.height;
|
||||||
|
|
||||||
|
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
|
|
||||||
bool isFormInvalid() {
|
bool isFormInvalid() {
|
||||||
if (_model.nameRegisterFormTextController.text == '' ||
|
if (_model.nameRegisterFormTextController.text == '' ||
|
||||||
|
@ -143,42 +150,28 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(4.0),
|
padding: const EdgeInsets.all(20.0),
|
||||||
child: Container(
|
child: Align(
|
||||||
width: 669.0,
|
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||||
height: 112.0,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(16.0),
|
|
||||||
),
|
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(20.0),
|
padding: const EdgeInsets.all(4.0),
|
||||||
child: Column(
|
child: Text(
|
||||||
mainAxisSize: MainAxisSize.max,
|
FFLocalizations.of(context).getText(
|
||||||
children: [
|
'49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
||||||
Expanded(
|
),
|
||||||
child: Align(
|
textAlign: TextAlign.start,
|
||||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
style: FlutterFlowTheme.of(context)
|
||||||
child: Padding(
|
.displaySmall
|
||||||
padding: const EdgeInsets.all(4.0),
|
.override(
|
||||||
child: Text(
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
FFLocalizations.of(context).getText(
|
color: FlutterFlowTheme.of(context)
|
||||||
'49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
.primaryText,
|
||||||
),
|
fontSize: limitedHeaderFontSize,
|
||||||
textAlign: TextAlign.start,
|
letterSpacing: 0.0,
|
||||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
fontWeight: FontWeight.w500,
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.containsKey('Plus Jakarta Sans'),
|
||||||
fontSize: screenWidth * 0.06,
|
|
||||||
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(
|
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 16.0,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
|
@ -277,7 +270,19 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
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(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color: FlutterFlowTheme.of(context).error,
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
|
@ -295,7 +300,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 16.0,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
|
@ -330,7 +335,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 16.0,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
|
@ -357,7 +362,19 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
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(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color: FlutterFlowTheme.of(context).error,
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
|
@ -375,7 +392,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).customColor1,
|
color: FlutterFlowTheme.of(context).customColor1,
|
||||||
fontSize: 16.0,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
|
@ -411,7 +428,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 16.0,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
|
@ -438,9 +455,23 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
errorStyle: TextStyle(
|
||||||
borderSide: const BorderSide(
|
fontFamily:
|
||||||
color: Color(0xFFFF5963),
|
'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,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
|
@ -448,7 +479,9 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
suffixIcon: InkWell(
|
suffixIcon: InkWell(
|
||||||
key: const ValueKey<String>('passwordVisibilitySuffixIcon'),
|
key: const ValueKey<
|
||||||
|
String>(
|
||||||
|
'passwordVisibilitySuffixIcon'),
|
||||||
onTap: () => setState(
|
onTap: () => setState(
|
||||||
() => _model.passwordRegisterFormVisibility =
|
() => _model.passwordRegisterFormVisibility =
|
||||||
!_model.passwordRegisterFormVisibility,
|
!_model.passwordRegisterFormVisibility,
|
||||||
|
@ -466,7 +499,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 16.0,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
|
@ -483,7 +516,8 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
Padding(
|
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(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>('SubmitButtonWidget'),
|
key: const ValueKey<String>(
|
||||||
|
'SubmitButtonWidget'),
|
||||||
onPressed: isFormInvalid()
|
onPressed: isFormInvalid()
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
|
@ -497,12 +531,17 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
);
|
);
|
||||||
shouldSetState = true;
|
shouldSetState = true;
|
||||||
if (_model.register == true)
|
if (_model.register == true)
|
||||||
await widget.toggleSignInPage?.call();
|
|
||||||
|
await widget
|
||||||
|
.toggleSignInPage
|
||||||
|
?.call();
|
||||||
else {
|
else {
|
||||||
if (shouldSetState) setState(() {});
|
if (shouldSetState)
|
||||||
|
setState(() {});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (shouldSetState) setState(() {});
|
if (shouldSetState)
|
||||||
|
setState(() {});
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context).getText(
|
text: FFLocalizations.of(context).getText(
|
||||||
'rnvdwzei' /* Cadastrar-se */,
|
'rnvdwzei' /* Cadastrar-se */,
|
||||||
|
@ -516,7 +555,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).secondaryText,
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
fontSize: 16.0,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
|
@ -538,12 +577,15 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
key: const ValueKey<String>('toggleSignInPage'),
|
key: const ValueKey<String>(
|
||||||
|
'toggleSignInPage'),
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
hoverColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onTap: () async => await widget.toggleSignInPage?.call(),
|
onTap: () async => await widget
|
||||||
|
.toggleSignInPage
|
||||||
|
?.call(),
|
||||||
child: RichText(
|
child: RichText(
|
||||||
textScaler: MediaQuery.of(context).textScaler,
|
textScaler: MediaQuery.of(context).textScaler,
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
|
@ -554,6 +596,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
),
|
),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
|
@ -563,7 +606,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
fontSize: 14.0,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
useGoogleFonts:
|
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_util.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
|
|
||||||
class VisitorSearchModalTemplateComponentWidget extends StatefulWidget {
|
class VisitorSearchModalTemplateComponentWidget extends StatefulWidget {
|
||||||
const VisitorSearchModalTemplateComponentWidget({
|
const VisitorSearchModalTemplateComponentWidget({
|
||||||
|
@ -56,281 +57,287 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
|
final double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
|
final double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
||||||
child: Container(
|
child: Column(
|
||||||
width: MediaQuery.of(context).size.width,
|
mainAxisSize: MainAxisSize.max,
|
||||||
decoration: const BoxDecoration(
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
color: Colors.transparent,
|
children: [
|
||||||
borderRadius: BorderRadius.only(
|
Container(
|
||||||
bottomLeft: Radius.circular(0.0),
|
width: 40,
|
||||||
bottomRight: Radius.circular(0.0),
|
height: 5,
|
||||||
topLeft: Radius.circular(15.0),
|
decoration: BoxDecoration(
|
||||||
topRight: Radius.circular(15.0),
|
color: Colors.grey[300],
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
Column(children: [
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
],),
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
Padding(
|
||||||
children: [
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 25.0, 16.0, 0.0),
|
||||||
Container(
|
child: TextFormField(
|
||||||
width: 40,
|
controller: _model.textController,
|
||||||
height: 5,
|
focusNode: _model.textFieldFocusNode,
|
||||||
decoration: BoxDecoration(
|
onFieldSubmitted: (_) async {
|
||||||
color: Colors.grey[300],
|
await addVisitor(context);
|
||||||
borderRadius: BorderRadius.circular(10),
|
safeSetState(() {});
|
||||||
),
|
},
|
||||||
),
|
autofocus: false,
|
||||||
Padding(
|
textInputAction: TextInputAction.done,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 25.0, 16.0, 0.0),
|
obscureText: false,
|
||||||
child: TextFormField(
|
decoration: InputDecoration(
|
||||||
controller: _model.textController,
|
isDense: true,
|
||||||
focusNode: _model.textFieldFocusNode,
|
labelText: FFLocalizations.of(context).getVariableText(
|
||||||
onFieldSubmitted: (_) async {
|
enText: 'Document of the Visitor',
|
||||||
await addVisitor(context);
|
ptText: 'Documento do Visitante',
|
||||||
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),
|
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
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),
|
enabledBorder: OutlineInputBorder(
|
||||||
validator: _model.textControllerValidator.asValidator(context),
|
borderSide: BorderSide(color: FlutterFlowTheme.of(context).accent1, width: 0.5),
|
||||||
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
|
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),
|
||||||
),
|
),
|
||||||
),
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
if (_model.visitors.isNotEmpty && _model.visitors.isNotEmpty)
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
Row(
|
letterSpacing: 0.0,
|
||||||
mainAxisSize: MainAxisSize.max,
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
fontSize: limitedInputFontSize,
|
||||||
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),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Padding(
|
keyboardType: const TextInputType.numberWithOptions(signed: true),
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(4.0, 12.0, 16.0, 0.0),
|
validator: _model.textControllerValidator.asValidator(context),
|
||||||
child: Text(
|
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
|
||||||
_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),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
if (_model.visitors.isNotEmpty && _model.visitors.isNotEmpty)
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
FFButtonWidget(
|
Padding(
|
||||||
onPressed: MediaQuery.of(context).viewInsets.bottom > 0
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 0.0, 0.0),
|
||||||
? () async => await addVisitor(context).whenComplete(safeSetState(() {}))
|
child: Text(
|
||||||
: () async => await sendVisitors(context),
|
FFLocalizations.of(context).getText('9coywebh'),
|
||||||
text: MediaQuery.of(context).viewInsets.bottom > 0
|
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
? FFLocalizations.of(context).getVariableText(
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
enText: 'Add',
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
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,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
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)
|
message: FFLocalizations.of(context)
|
||||||
.getVariableText(ptText: 'Visitante já adicionado!', enText: 'Visitor already added!'),
|
.getVariableText(ptText: 'Visitante já adicionado!', enText: 'Visitor already added!'),
|
||||||
gravity: ToastGravity.TOP,
|
gravity: ToastGravity.TOP,
|
||||||
backgroundColor: Colors.red);
|
backgroundColor: Colors.red,
|
||||||
|
fontSize: LimitedFontSizeUtil.getBodyFontSize(context)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
await showAdaptiveDialog(
|
await showAdaptiveDialog(
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_animate/flutter_animate.dart';
|
import 'package:flutter_animate/flutter_animate.dart';
|
||||||
import 'package:google_fonts/google_fonts.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/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_animations.dart';
|
||||||
import '/flutter_flow/flutter_flow_theme.dart';
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
@ -25,7 +26,9 @@ class WelcomeTemplateComponentWidget extends StatefulWidget {
|
||||||
State<WelcomeTemplateComponentWidget> createState() => _WelcomeTemplateComponentWidgetState();
|
State<WelcomeTemplateComponentWidget> createState() => _WelcomeTemplateComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponentWidget> with TickerProviderStateMixin {
|
class _WelcomeTemplateComponentWidgetState
|
||||||
|
extends State<WelcomeTemplateComponentWidget>
|
||||||
|
with TickerProviderStateMixin {
|
||||||
late WelcomeTemplateComponentModel _model;
|
late WelcomeTemplateComponentModel _model;
|
||||||
final animationsMap = <String, AnimationInfo>{};
|
final animationsMap = <String, AnimationInfo>{};
|
||||||
|
|
||||||
|
@ -86,6 +89,10 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
|
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||||
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
|
|
||||||
return Align(
|
return Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
|
@ -93,64 +100,56 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Padding(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
padding: const EdgeInsets.all(14.0),
|
||||||
child: SafeArea(
|
child: Column(
|
||||||
child: Container(
|
mainAxisSize: MainAxisSize.min,
|
||||||
width: 648.0,
|
children: [
|
||||||
height: 208.0,
|
Text(
|
||||||
decoration: BoxDecoration(
|
FFLocalizations.of(context)
|
||||||
borderRadius: BorderRadius.circular(16.0),
|
.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),
|
Align(
|
||||||
child: Align(
|
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
child: Text(
|
||||||
child: Padding(
|
FFLocalizations.of(context).getText(
|
||||||
padding: const EdgeInsets.all(14.0),
|
'5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
|
||||||
child: Column(
|
textAlign: TextAlign.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||||
children: [
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
Text(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
FFLocalizations.of(context).getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
|
fontSize: limitedSubHeaderFontSize,
|
||||||
textAlign: TextAlign.start,
|
letterSpacing: 0.0,
|
||||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
fontWeight: FontWeight.w600,
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
.containsKey('Plus Jakarta Sans'),
|
||||||
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: 15.0,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Padding(
|
||||||
width: 284.0,
|
padding: const EdgeInsets.fromLTRB(0, 25, 0, 0),
|
||||||
height: 200.0,
|
child: Container(
|
||||||
decoration: const BoxDecoration(),
|
width: 284.0,
|
||||||
child: ClipRRect(
|
height: 200.0,
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
decoration: const BoxDecoration(),
|
||||||
child: const AtomImageSvgTheme(filename: 'welcome', width: 600, height: double.infinity),
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
|
child: const AtomImageSvgTheme(
|
||||||
|
filename: 'welcome', width: 600, height: double.infinity),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
|
@ -183,14 +182,20 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
children: [
|
children: [
|
||||||
Builder(
|
Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if (MediaQuery.sizeOf(context).width < kBreakpointSmall ? true : false) {
|
if (MediaQuery.sizeOf(context).width <
|
||||||
|
kBreakpointSmall
|
||||||
|
? true
|
||||||
|
: false) {
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
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(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>('toggleSignInPage'),
|
key: const ValueKey<String>(
|
||||||
|
'toggleSignInPage'),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.toggleSignInPage?.call();
|
await widget.toggleSignInPage?.call();
|
||||||
},
|
},
|
||||||
|
@ -198,13 +203,20 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 44.0,
|
height: 44.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
iconPadding:
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
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',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
fontSize: 16.0,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
|
@ -238,10 +250,11 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
fontSize: 16.0,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
|
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
|
@ -264,9 +277,11 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>('toggleSignInPage'),
|
key: const ValueKey<String>(
|
||||||
|
'toggleSignInPage'),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.toggleSignInPage?.call();
|
await widget.toggleSignInPage
|
||||||
|
?.call();
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context).getText(
|
text: FFLocalizations.of(context).getText(
|
||||||
'zvtay8ee' /* Entrar */,
|
'zvtay8ee' /* Entrar */,
|
||||||
|
@ -300,7 +315,8 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>('toggleSignUpPage'),
|
key: const ValueKey<String>(
|
||||||
|
'toggleSignUpPage'),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.toggleSignUpPage?.call();
|
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/flutter_flow_widgets.dart';
|
||||||
import 'package:hub/flutter_flow/internationalization.dart';
|
import 'package:hub/flutter_flow/internationalization.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.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:intl/intl.dart';
|
||||||
import 'package:json_path/json_path.dart';
|
import 'package:json_path/json_path.dart';
|
||||||
import 'package:timeago/timeago.dart' as timeago;
|
import 'package:timeago/timeago.dart' as timeago;
|
||||||
|
@ -189,6 +190,12 @@ Theme wrapInMaterialTimePickerTheme(
|
||||||
required double iconSize,
|
required double iconSize,
|
||||||
}) {
|
}) {
|
||||||
final baseTheme = Theme.of(context);
|
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(
|
return Theme(
|
||||||
data: baseTheme.copyWith(
|
data: baseTheme.copyWith(
|
||||||
focusColor: headerBackgroundColor,
|
focusColor: headerBackgroundColor,
|
||||||
|
@ -264,6 +271,10 @@ Theme wrapInMaterialTimePickerTheme(
|
||||||
dayPeriodBorderSide: BorderSide(
|
dayPeriodBorderSide: BorderSide(
|
||||||
color: pickerForegroundColor,
|
color: pickerForegroundColor,
|
||||||
),
|
),
|
||||||
|
dialTextStyle: baseTheme.textTheme.headlineMedium!.copyWith(
|
||||||
|
color: pickerDialForegroundColor,
|
||||||
|
fontSize: limitedFontSize,
|
||||||
|
),
|
||||||
dayPeriodTextColor: WidgetStateColor.resolveWith((states) =>
|
dayPeriodTextColor: WidgetStateColor.resolveWith((states) =>
|
||||||
states.contains(WidgetState.selected) ? selectedDateTimeForegroundColor : pickerForegroundColor),
|
states.contains(WidgetState.selected) ? selectedDateTimeForegroundColor : pickerForegroundColor),
|
||||||
dayPeriodColor: WidgetStateColor.resolveWith(
|
dayPeriodColor: WidgetStateColor.resolveWith(
|
||||||
|
@ -513,6 +524,7 @@ void showSnackbar(
|
||||||
message,
|
message,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).info,
|
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(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
title: Text(title),
|
title: Text(title, style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedHeaderFontSize), textAlign: TextAlign.center),
|
||||||
content: Text(content),
|
content: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Text(content, style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedBodyFontSize)),
|
||||||
|
),
|
||||||
actions: [
|
actions: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
@ -544,15 +564,17 @@ void showAlertDialog(BuildContext context, String title, String content, Future<
|
||||||
onPressed: () => context.pop(), //Navigator.pop(context),
|
onPressed: () => context.pop(), //Navigator.pop(context),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: MediaQuery.of(context).size.width * 0.3,
|
width: MediaQuery.of(context).size.width * 0.3,
|
||||||
height: MediaQuery.of(context).size.height * 0.05,
|
height: 50,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: limitedInputFontSize
|
||||||
),
|
),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
width: 1,
|
width: 1,
|
||||||
),
|
),
|
||||||
|
splashColor: const Color.fromARGB(255, 129, 129, 129),
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
),
|
),
|
||||||
|
@ -567,12 +589,14 @@ void showAlertDialog(BuildContext context, String title, String content, Future<
|
||||||
},
|
},
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: MediaQuery.of(context).size.width * 0.3,
|
width: MediaQuery.of(context).size.width * 0.3,
|
||||||
height: MediaQuery.of(context).size.height * 0.05,
|
height: 50,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: limitedInputFontSize
|
||||||
),
|
),
|
||||||
|
splashColor: const Color.fromARGB(255, 129, 129, 129),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
width: 1,
|
width: 1,
|
||||||
|
|
|
@ -93,12 +93,13 @@ class _FFButtonWidgetState extends State<FFButtonWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: AutoSizeText(
|
: Text(
|
||||||
text ?? '',
|
text ?? '',
|
||||||
style: text == null ? null : widget.options.textStyle?.withoutColor(),
|
style: text == null ? null : widget.options.textStyle?.withoutColor(),
|
||||||
textAlign: widget.options.textAlign,
|
textAlign: widget.options.textAlign,
|
||||||
maxLines: maxLines,
|
maxLines: maxLines,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final onPressed = widget.onPressed != null
|
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:google_mlkit_face_detection/google_mlkit_face_detection.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.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:image_picker/image_picker.dart';
|
||||||
import 'package:mime_type/mime_type.dart';
|
import 'package:mime_type/mime_type.dart';
|
||||||
|
|
||||||
|
@ -557,7 +558,11 @@ void showUploadMessage(
|
||||||
: null,
|
: 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,
|
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: 1921, end: 2560, name: HD4K),
|
||||||
const Breakpoint(start: 2561, end: double.infinity, name: ULTRAWIDE),
|
const Breakpoint(start: 2561, end: double.infinity, name: ULTRAWIDE),
|
||||||
];
|
];
|
||||||
|
|
||||||
return ResponsiveBreakpoints.builder(
|
return ResponsiveBreakpoints.builder(
|
||||||
child: BouncingScrollWrapper.builder(context, widget!),
|
child: BouncingScrollWrapper.builder(context, widget!),
|
||||||
breakpoints: breakpoints,
|
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/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'package:hub/pages/acess_history_page/acess_history_page_model.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/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/log_util.dart';
|
||||||
import 'package:rxdart/rxdart.dart';
|
import 'package:rxdart/rxdart.dart';
|
||||||
|
|
||||||
|
@ -223,6 +224,7 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
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),
|
duration: const Duration(seconds: 3),
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
|
|
@ -20,7 +20,7 @@ class HomePageWidget extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _HomePageWidgetState extends State<HomePageWidget> {
|
class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
late HomePageModel _model;
|
late HomePageModel _model;
|
||||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
|
||||||
late LocalProfileComponentWidget _localProfileComponentWidget;
|
late LocalProfileComponentWidget _localProfileComponentWidget;
|
||||||
|
@ -48,6 +48,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
_model.textFieldFocusNode ??= FocusNode();
|
_model.textFieldFocusNode ??= FocusNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
StorageHelper().context = context;
|
StorageHelper().context = context;
|
||||||
|
|
|
@ -10,6 +10,7 @@ import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/pages/liberation_history/liberation_history_model.dart';
|
import 'package:hub/pages/liberation_history/liberation_history_model.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
import 'package:hub/shared/utils/log_util.dart';
|
import 'package:hub/shared/utils/log_util.dart';
|
||||||
import 'package:hub/shared/utils/validator_util.dart';
|
import 'package:hub/shared/utils/validator_util.dart';
|
||||||
|
|
||||||
|
@ -347,6 +348,10 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
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),
|
duration: const Duration(seconds: 3),
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
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/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/pages/message_history_page/message_history_page_model.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/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/log_util.dart';
|
||||||
|
|
||||||
class MessageHistoryPageWidget extends StatefulWidget {
|
class MessageHistoryPageWidget extends StatefulWidget {
|
||||||
|
@ -161,7 +162,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontFamily: 'Nunito',
|
fontFamily: 'Nunito',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 15.0,
|
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||||
|
@ -173,6 +174,8 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _body(BuildContext context) {
|
Widget _body(BuildContext context) {
|
||||||
|
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
|
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
top: true,
|
top: true,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
@ -186,7 +189,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
||||||
unselectedLabelColor: FlutterFlowTheme.of(context).primaryText,
|
unselectedLabelColor: FlutterFlowTheme.of(context).primaryText,
|
||||||
labelStyle: FlutterFlowTheme.of(context).titleMedium.override(
|
labelStyle: FlutterFlowTheme.of(context).titleMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).titleMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).titleMediumFamily,
|
||||||
fontSize: 13.0,
|
fontSize: limitedBodyFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleMediumFamily),
|
||||||
),
|
),
|
||||||
|
@ -223,8 +226,13 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: Text(FFLocalizations.of(context)
|
child: Text(FFLocalizations.of(context).getVariableText(
|
||||||
.getVariableText(ptText: "Nenhuma mensagem encontrada!", enText: "No message found")),
|
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(
|
SnackBar(
|
||||||
content: Text(
|
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),
|
duration: const Duration(seconds: 3),
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -275,6 +287,8 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _item(BuildContext context, dynamic jsonBody) {
|
Widget _item(BuildContext context, dynamic jsonBody) {
|
||||||
|
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
|
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||||
child: Card(
|
child: Card(
|
||||||
|
@ -309,7 +323,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
||||||
jsonBody['MSG_ORIGEM_DESC'].toString(),
|
jsonBody['MSG_ORIGEM_DESC'].toString(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 15,
|
fontSize: limitedSubHeaderFontSize,
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
),
|
),
|
||||||
overflow: TextOverflow.fade,
|
overflow: TextOverflow.fade,
|
||||||
|
@ -334,8 +348,9 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
||||||
jsonBody['MSG_DATE'].toString(),
|
jsonBody['MSG_DATE'].toString(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 10,
|
fontSize: limitedBodyFontSize,
|
||||||
color: FlutterFlowTheme.of(context).customColor6,
|
color:
|
||||||
|
FlutterFlowTheme.of(context).customColor6,
|
||||||
),
|
),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
|
@ -357,6 +372,11 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
jsonBody['MSG_TEXTO'].toString(),
|
jsonBody['MSG_TEXTO'].toString(),
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: limitedBodyFontSize,
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(context).customColor6,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].divide(const SizedBox(width: 15)),
|
].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/base_storage.dart';
|
||||||
import 'package:hub/shared/helpers/storage_helper.dart';
|
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
import 'package:hub/shared/utils/log_util.dart';
|
import 'package:hub/shared/utils/log_util.dart';
|
||||||
import 'package:hub/shared/utils/validator_util.dart';
|
import 'package:hub/shared/utils/validator_util.dart';
|
||||||
import 'package:rxdart/rxdart.dart';
|
import 'package:rxdart/rxdart.dart';
|
||||||
|
@ -79,6 +80,10 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
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),
|
duration: const Duration(seconds: 3),
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -158,25 +163,31 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
icon: const Icon(Icons.filter_list),
|
icon: const Icon(Icons.filter_list),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final Map<String, String>? selectedFilter = await showModalBottomSheet<Map<String, String>>(
|
final Map<String, String>? selectedFilter =
|
||||||
isScrollControlled: true,
|
await showModalBottomSheet<Map<String, String>>(
|
||||||
backgroundColor: Colors.transparent,
|
isScrollControlled: true,
|
||||||
context: context,
|
backgroundColor: Colors.transparent,
|
||||||
builder: (context) {
|
context: context,
|
||||||
return GestureDetector(
|
builder: (context) {
|
||||||
onTap: () => Navigator.of(context).pop(),
|
return GestureDetector(
|
||||||
child: Container(
|
onTap: () => Navigator.of(context).pop(),
|
||||||
color: Colors.transparent,
|
child: Container(
|
||||||
child: GestureDetector(
|
color: Colors.transparent,
|
||||||
onTap: () {},
|
child: GestureDetector(
|
||||||
child: OrderFilterModalWidget(
|
onTap: () {},
|
||||||
defaultAdresseeType: _selectedTypeSubject.value['adresseeType'] ?? '.*',
|
child: OrderFilterModalWidget(
|
||||||
defaultStatus: _selectedTypeSubject.value['status'] ?? '.*',
|
defaultAdresseeType: _selectedTypeSubject
|
||||||
|
.value['adresseeType'] ??
|
||||||
|
'.*',
|
||||||
|
defaultStatus:
|
||||||
|
_selectedTypeSubject.value['status'] ??
|
||||||
|
'.*',
|
||||||
|
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
),
|
});
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (selectedFilter != null) {
|
if (selectedFilter != null) {
|
||||||
_updateFilterAction(selectedFilter);
|
_updateFilterAction(selectedFilter);
|
||||||
|
@ -250,8 +261,13 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context)
|
FFLocalizations.of(context).getVariableText(
|
||||||
.getVariableText(ptText: "Nenhuma encomenda encontrada!", enText: "No orders found!"),
|
ptText: "Nenhuma encomenda encontrada!",
|
||||||
|
enText: "No orders found!"),
|
||||||
|
style: TextStyle(
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||||
|
),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -7,6 +7,7 @@ import 'package:hub/pages/pets_page/pets_page_model.dart';
|
||||||
import 'package:hub/shared/helpers/base_storage.dart';
|
import 'package:hub/shared/helpers/base_storage.dart';
|
||||||
import 'package:hub/shared/helpers/storage_helper.dart';
|
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
import 'package:hub/shared/utils/log_util.dart';
|
import 'package:hub/shared/utils/log_util.dart';
|
||||||
|
|
||||||
class PetsHistoryScreen extends StatefulWidget {
|
class PetsHistoryScreen extends StatefulWidget {
|
||||||
|
@ -104,6 +105,10 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
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),
|
duration: const Duration(seconds: 3),
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -113,6 +118,9 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
double limitedBodyTextSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
|
double limitedHeaderTextSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
@ -124,8 +132,13 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: Text(FFLocalizations.of(context)
|
child: Text(FFLocalizations.of(context).getVariableText(
|
||||||
.getVariableText(ptText: "Nenhum Pet encontrado!", enText: "No pets found")),
|
ptText: "Nenhum Pet encontrado!",
|
||||||
|
enText: "No pets found"),
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily: 'Nunito',
|
||||||
|
fontSize: limitedHeaderTextSize,)
|
||||||
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -150,6 +163,10 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
|
||||||
? FFLocalizations.of(context).getVariableText(ptText: "Ilimitado", enText: "Unlimited")
|
? FFLocalizations.of(context).getVariableText(ptText: "Ilimitado", enText: "Unlimited")
|
||||||
: "${FFLocalizations.of(context).getVariableText(ptText: "Quantidade de Pets: ", enText: "Amount of Pets: ")}$count/${widget.model.petAmountRegister}",
|
: "${FFLocalizations.of(context).getVariableText(ptText: "Quantidade de Pets: ", enText: "Amount of Pets: ")}$count/${widget.model.petAmountRegister}",
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily: 'Nunito',
|
||||||
|
fontSize: limitedBodyTextSize,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -16,6 +16,7 @@ import 'package:hub/shared/helpers/base_storage.dart';
|
||||||
import 'package:hub/shared/helpers/storage_helper.dart';
|
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
import 'package:hub/shared/utils/image_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:hub/shared/utils/validator_util.dart';
|
||||||
|
|
||||||
class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
||||||
|
@ -393,13 +394,15 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
||||||
// model.safeSetState!();
|
// model.safeSetState!();
|
||||||
},
|
},
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 130,
|
width: 100,
|
||||||
height: 40,
|
height: 40,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 15),
|
||||||
),
|
),
|
||||||
|
splashColor: const Color.fromARGB(95, 0, 146, 5),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
width: 1,
|
width: 1,
|
||||||
|
@ -469,13 +472,15 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 130,
|
width: 100,
|
||||||
height: 40,
|
height: 40,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 15),
|
||||||
),
|
),
|
||||||
|
splashColor: const Color.fromARGB(131, 255, 17, 0),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
width: 1,
|
width: 1,
|
||||||
|
|
|
@ -12,6 +12,7 @@ import 'package:hub/flutter_flow/form_field_controller.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/pages/pets_page/pets_history_screen.dart';
|
import 'package:hub/pages/pets_page/pets_history_screen.dart';
|
||||||
import 'package:hub/pages/pets_page/pets_page_model.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';
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
|
|
||||||
// ignore: must_be_immutable
|
// ignore: must_be_immutable
|
||||||
|
@ -100,6 +101,10 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildRegisterForm(BuildContext context) {
|
Widget _buildRegisterForm(BuildContext context) {
|
||||||
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
|
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
|
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||||
|
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
@ -118,200 +123,273 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedHeaderFontSize,
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Form(
|
Form(
|
||||||
key: _model.registerFormKey,
|
key: _model.registerFormKey,
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
child:
|
child: Column(
|
||||||
Column(mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
|
mainAxisSize: MainAxisSize.max,
|
||||||
Padding(
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
padding: const EdgeInsets.fromLTRB(0, 10, 0, 20),
|
children: [
|
||||||
child: MediaUploadButtonUtil(
|
Padding(
|
||||||
onUploadComplete: _model.handleUploadComplete,
|
padding: const EdgeInsets.fromLTRB(0, 10, 0, 20),
|
||||||
isUploading: _model.isDataUploading,
|
child: MediaUploadButtonUtil(
|
||||||
uploadedFiles: _model.uploadedLocalFile,
|
onUploadComplete: _model.handleUploadComplete,
|
||||||
labelText: FFLocalizations.of(context).getVariableText(
|
isUploading: _model.isDataUploading,
|
||||||
ptText: 'Clique para adicionar a foto de seu Pet', enText: 'Click to add your Pet\'s photo'),
|
uploadedFiles: _model.uploadedLocalFile,
|
||||||
),
|
labelText: FFLocalizations.of(context).getVariableText(
|
||||||
),
|
ptText: 'Clique para adicionar a foto de seu Pet',
|
||||||
CustomInputUtil(
|
enText: 'Click to add your Pet\'s photo'),
|
||||||
controller: _model.textControllerName,
|
),
|
||||||
validator: _model.textControllerNameValidator.asValidator(context),
|
),
|
||||||
focusNode: _model.textFieldFocusName,
|
CustomInputUtil(
|
||||||
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name'),
|
controller: _model.textControllerName,
|
||||||
hintText: FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name'),
|
validator: _model.textControllerNameValidator
|
||||||
suffixIcon: Symbols.format_color_text,
|
.asValidator(context),
|
||||||
haveMaxLength: true,
|
focusNode: _model.textFieldFocusName,
|
||||||
onChanged: (value) => setState(() {}),
|
labelText: FFLocalizations.of(context)
|
||||||
maxLength: 80,
|
.getVariableText(ptText: 'Nome', enText: 'Name'),
|
||||||
),
|
hintText: FFLocalizations.of(context)
|
||||||
CustomInputUtil(
|
.getVariableText(ptText: 'Nome', enText: 'Name'),
|
||||||
controller: _model.textControllerSpecies,
|
suffixIcon: Symbols.format_color_text,
|
||||||
validator: _model.textControllerSpeciesValidator.asValidator(context),
|
haveMaxLength: true,
|
||||||
focusNode: _model.textFieldFocusSpecies,
|
onChanged: (value) => setState(() {}),
|
||||||
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Espécie', enText: 'Species'),
|
maxLength: 80,
|
||||||
hintText: FFLocalizations.of(context)
|
),
|
||||||
.getVariableText(ptText: 'Ex: Cachorro, Gato, Papagaio', enText: 'e.g. Dog, Cat, Parrot'),
|
CustomInputUtil(
|
||||||
suffixIcon: Symbols.sound_detection_dog_barking,
|
controller: _model.textControllerSpecies,
|
||||||
haveMaxLength: true,
|
validator: _model.textControllerSpeciesValidator
|
||||||
onChanged: (value) => setState(() {}),
|
.asValidator(context),
|
||||||
maxLength: 80,
|
focusNode: _model.textFieldFocusSpecies,
|
||||||
),
|
labelText: FFLocalizations.of(context).getVariableText(
|
||||||
Padding(
|
ptText: 'Espécie', enText: 'Species'),
|
||||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
hintText: FFLocalizations.of(context).getVariableText(
|
||||||
child: CustomInputUtil(
|
ptText: 'Ex: Cachorro, Gato, Papagaio',
|
||||||
controller: _model.textControllerRace,
|
enText: 'e.g. Dog, Cat, Parrot'),
|
||||||
validator: _model.textControllerRaceValidator.asValidator(context),
|
suffixIcon: Symbols.sound_detection_dog_barking,
|
||||||
focusNode: _model.textFieldFocusRace,
|
haveMaxLength: true,
|
||||||
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Raça', enText: 'Race'),
|
onChanged: (value) => setState(() {}),
|
||||||
hintText: FFLocalizations.of(context).getVariableText(
|
maxLength: 80,
|
||||||
ptText: 'Ex: Labrador, Poodle, Siamês, Persa',
|
),
|
||||||
enText: 'e.g. Labrador, Poodle, Siamese, Persian'),
|
CustomInputUtil(
|
||||||
suffixIcon: Icons.pets_outlined,
|
controller: _model.textControllerRace,
|
||||||
haveMaxLength: true,
|
validator: _model.textControllerRaceValidator
|
||||||
onChanged: (value) => setState(() {}),
|
.asValidator(context),
|
||||||
maxLength: 80,
|
focusNode: _model.textFieldFocusRace,
|
||||||
),
|
labelText: FFLocalizations.of(context)
|
||||||
),
|
.getVariableText(ptText: 'Raça', enText: 'Race'),
|
||||||
Padding(
|
hintText: FFLocalizations.of(context).getVariableText(
|
||||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
ptText: 'Ex: Labrador, Poodle, Siamês, Persa',
|
||||||
child: CustomInputUtil(
|
enText: 'e.g. Labrador, Poodle, Siamese, Persian'),
|
||||||
controller: _model.textControllerColor,
|
suffixIcon: Icons.pets_outlined,
|
||||||
validator: _model.textControllerColorValidator.asValidator(context),
|
haveMaxLength: true,
|
||||||
focusNode: _model.textFieldFocusColor,
|
onChanged: (value) => setState(() {}),
|
||||||
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Cor', enText: 'Color'),
|
maxLength: 80,
|
||||||
hintText: FFLocalizations.of(context)
|
),
|
||||||
.getVariableText(ptText: 'Ex: Preto, Amarelo, Branco', enText: 'e.g. Black, Yellow, White'),
|
CustomInputUtil(
|
||||||
suffixIcon: Symbols.palette,
|
controller: _model.textControllerColor,
|
||||||
haveMaxLength: true,
|
validator: _model.textControllerColorValidator
|
||||||
onChanged: (value) => setState(() {}),
|
.asValidator(context),
|
||||||
maxLength: 80,
|
focusNode: _model.textFieldFocusColor,
|
||||||
),
|
labelText: FFLocalizations.of(context)
|
||||||
),
|
.getVariableText(ptText: 'Cor', enText: 'Color'),
|
||||||
Padding(
|
hintText: FFLocalizations.of(context).getVariableText(
|
||||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
ptText: 'Ex: Preto, Amarelo, Branco',
|
||||||
child: Row(
|
enText: 'e.g. Black, Yellow, White'),
|
||||||
mainAxisSize: MainAxisSize.max,
|
suffixIcon: Symbols.palette,
|
||||||
children: [
|
haveMaxLength: true,
|
||||||
SizedBox(
|
onChanged: (value) => setState(() {}),
|
||||||
width: MediaQuery.of(context).size.width,
|
maxLength: 80,
|
||||||
height: 60.0,
|
),
|
||||||
child: Stack(
|
Padding(
|
||||||
children: [
|
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||||
Padding(
|
child: Row(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
mainAxisSize: MainAxisSize.max,
|
||||||
child: TextFormField(
|
children: [
|
||||||
controller: _model.textControllerData,
|
SizedBox(
|
||||||
focusNode: _model.textFieldFocusData,
|
width: MediaQuery.of(context).size.width,
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
height: 60.0,
|
||||||
readOnly: true,
|
child: Stack(
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
children: [
|
||||||
autofocus: false,
|
Padding(
|
||||||
obscureText: false,
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
decoration: InputDecoration(
|
24.0, 0.0, 24.0, 0.0),
|
||||||
isDense: true,
|
child: TextFormField(
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
controller: _model.textControllerData,
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
focusNode: _model.textFieldFocusData,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
cursorColor:
|
||||||
letterSpacing: 0.0,
|
FlutterFlowTheme.of(context).primary,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
readOnly: true,
|
||||||
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
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(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
ptText: 'Data de Nascimento',
|
.labelMedium
|
||||||
enText: 'Date of Birth',
|
.override(
|
||||||
),
|
fontFamily:
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context)
|
||||||
letterSpacing: 0.0,
|
.primaryText,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
letterSpacing: 0.0,
|
||||||
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
lineHeight: 1.0,
|
.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),
|
style: FlutterFlowTheme.of(context)
|
||||||
),
|
.bodyMedium
|
||||||
focusedBorder: OutlineInputBorder(
|
.override(
|
||||||
borderSide: BorderSide(
|
fontFamily:
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
FlutterFlowTheme.of(context)
|
||||||
width: 0.5,
|
.bodyMediumFamily,
|
||||||
),
|
letterSpacing: 0.0,
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
),
|
.containsKey(
|
||||||
errorBorder: OutlineInputBorder(
|
FlutterFlowTheme.of(context)
|
||||||
borderSide: BorderSide(
|
.bodyMediumFamily),
|
||||||
color: FlutterFlowTheme.of(context).error,
|
lineHeight: 1.8,
|
||||||
width: 0.5,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
textAlign: TextAlign.start,
|
||||||
),
|
validator: _model
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
.textControllerDataValidator
|
||||||
borderSide: BorderSide(
|
.asValidator(context),
|
||||||
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(
|
Padding(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
letterSpacing: 0.0,
|
24.0, 0.0, 24.0, 0.0),
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
child: InkWell(
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
splashColor: Colors.transparent,
|
||||||
lineHeight: 1.8,
|
focusColor: Colors.transparent,
|
||||||
),
|
hoverColor: Colors.transparent,
|
||||||
textAlign: TextAlign.start,
|
highlightColor: Colors.transparent,
|
||||||
validator: _model.textControllerDataValidator.asValidator(context),
|
onTap: () async {
|
||||||
),
|
final pickedDate = await showDatePicker(
|
||||||
),
|
context: context,
|
||||||
Padding(
|
initialDate: getCurrentTimestamp,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
firstDate: DateTime(1990),
|
||||||
child: InkWell(
|
lastDate: DateTime.now(),
|
||||||
splashColor: Colors.transparent,
|
builder: (context, child) {
|
||||||
focusColor: Colors.transparent,
|
return wrapInMaterialDatePickerTheme(
|
||||||
hoverColor: Colors.transparent,
|
context,
|
||||||
highlightColor: Colors.transparent,
|
child!,
|
||||||
onTap: () async {
|
headerBackgroundColor:
|
||||||
final pickedDate = await showDatePicker(
|
FlutterFlowTheme.of(context)
|
||||||
context: context,
|
.primary,
|
||||||
initialDate: getCurrentTimestamp,
|
headerForegroundColor:
|
||||||
firstDate: DateTime(1990),
|
FlutterFlowTheme.of(context)
|
||||||
lastDate: DateTime.now(),
|
.info,
|
||||||
builder: (context, child) {
|
headerTextStyle:
|
||||||
return wrapInMaterialDatePickerTheme(
|
FlutterFlowTheme.of(context)
|
||||||
context,
|
.headlineLarge
|
||||||
child!,
|
.override(
|
||||||
headerBackgroundColor: FlutterFlowTheme.of(context).primary,
|
fontFamily: FlutterFlowTheme
|
||||||
headerForegroundColor: FlutterFlowTheme.of(context).info,
|
.of(context)
|
||||||
headerTextStyle: FlutterFlowTheme.of(context).headlineLarge.override(
|
.headlineLargeFamily,
|
||||||
fontFamily: FlutterFlowTheme.of(context).headlineLargeFamily,
|
fontSize: limitedInputFontSize,
|
||||||
fontSize: 32.0,
|
letterSpacing: 0.0,
|
||||||
letterSpacing: 0.0,
|
fontWeight:
|
||||||
fontWeight: FontWeight.w600,
|
FontWeight.w600,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts
|
||||||
.containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
|
.asMap()
|
||||||
),
|
.containsKey(
|
||||||
pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
FlutterFlowTheme.of(
|
||||||
pickerForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
context)
|
||||||
selectedDateTimeBackgroundColor: FlutterFlowTheme.of(context).primary,
|
.headlineLargeFamily),
|
||||||
selectedDateTimeForegroundColor: FlutterFlowTheme.of(context).info,
|
),
|
||||||
actionButtonForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
pickerBackgroundColor:
|
||||||
iconSize: 24.0,
|
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) {
|
if (pickedDate != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -321,132 +399,170 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
|
||||||
pickedDate.day,
|
pickedDate.day,
|
||||||
);
|
);
|
||||||
|
|
||||||
_model.textControllerData = TextEditingController(
|
_model.textControllerData =
|
||||||
text: dateTimeFormat(
|
TextEditingController(
|
||||||
'dd/MM/yyyy',
|
text: dateTimeFormat(
|
||||||
_model.selectedDate,
|
'dd/MM/yyyy',
|
||||||
locale: FFLocalizations.of(context).languageCode,
|
_model.selectedDate,
|
||||||
));
|
locale: FFLocalizations.of(context)
|
||||||
_model.textControllerData?.selection = TextSelection.collapsed(
|
.languageCode,
|
||||||
offset: _model.textControllerData!.text.length,
|
));
|
||||||
);
|
_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),
|
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,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
Padding(
|
||||||
),
|
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||||
Align(
|
child: CustomSelect(
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
options: const ['MAC', 'FEM'],
|
||||||
child: Padding(
|
controller: _model.dropDownValueController1 ??=
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0, 0.0, 15),
|
FormFieldController<String>(
|
||||||
child: Text(
|
_model.dropDownValue1 ??= ''),
|
||||||
FFLocalizations.of(context).getVariableText(
|
isRequired: true,
|
||||||
ptText: 'Selecione as opções disponíveis',
|
changed: (val) => safeSetState(() {
|
||||||
enText: 'Select the available options',
|
_model.dropDownValue1 = val;
|
||||||
),
|
}),
|
||||||
textAlign: TextAlign.start,
|
dropDownValue: _model.dropDownValue1,
|
||||||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
optionsLabel: [
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
FFLocalizations.of(context).getVariableText(
|
||||||
letterSpacing: 0.0,
|
ptText: 'Macho', enText: 'Male'),
|
||||||
fontWeight: FontWeight.w600,
|
FFLocalizations.of(context).getVariableText(
|
||||||
useGoogleFonts:
|
ptText: 'Fêmea', enText: 'Female')
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
],
|
||||||
|
hintText: FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Gênero do Pet',
|
||||||
|
enText: 'Gender of the Pet')
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Padding(
|
||||||
),
|
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||||
Padding(
|
child: CustomSelect(
|
||||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
options: const ['MIN', 'PEQ', 'MED', 'GRA', 'GIG'],
|
||||||
child: CustomSelect(
|
controller: _model.dropDownValueController2 ??=
|
||||||
options: const ['MAC', 'FEM'],
|
FormFieldController<String>(
|
||||||
controller: _model.dropDownValueController1 ??=
|
_model.dropDownValue2 ??= ''),
|
||||||
FormFieldController<String>(_model.dropDownValue1 ??= ''),
|
isRequired: true,
|
||||||
isRequired: true,
|
changed: (val) => safeSetState(() {
|
||||||
changed: (val) => safeSetState(() {
|
_model.dropDownValue2 = val;
|
||||||
_model.dropDownValue1 = val;
|
}),
|
||||||
}),
|
dropDownValue: _model.dropDownValue2,
|
||||||
dropDownValue: _model.dropDownValue1,
|
optionsLabel: [
|
||||||
optionsLabel: [
|
FFLocalizations.of(context).getVariableText(
|
||||||
FFLocalizations.of(context).getVariableText(ptText: 'Macho', enText: 'Male'),
|
ptText: 'Mini', enText: 'Mini'),
|
||||||
FFLocalizations.of(context).getVariableText(ptText: 'Fêmea', enText: 'Female')
|
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(
|
hintText: FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Selecione o gênero do Pet', enText: 'Select the gender of the Pet')),
|
ptText: 'Escreva as suas observações aqui...',
|
||||||
),
|
enText: 'Write your observations here...'),
|
||||||
Padding(
|
suffixIcon: Icons.text_fields,
|
||||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
haveMaxLength: true,
|
||||||
child: CustomSelect(
|
onChanged: (value) => setState(() {}),
|
||||||
options: const ['MIN', 'PEQ', 'MED', 'GRA', 'GIG'],
|
maxLength: 250,
|
||||||
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),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
Padding(
|
||||||
),
|
padding: const EdgeInsets.fromLTRB(70, 20, 70, 30),
|
||||||
CustomInputUtil(
|
child: SubmitButtonUtil(
|
||||||
controller: _model.textControllerObservation,
|
labelText: FFLocalizations.of(context)
|
||||||
validator: _model.textControllerObservationValidator.asValidator(context),
|
.getVariableText(
|
||||||
focusNode: _model.textFieldFocusObservation,
|
ptText: 'Cadastrar', enText: 'Register'),
|
||||||
labelText: FFLocalizations.of(context).getVariableText(
|
onPressed: _model.isFormValid(context)
|
||||||
ptText: 'Escreva as suas observações aqui...', enText: 'Write your observations here...'),
|
? _model.registerPet
|
||||||
hintText: FFLocalizations.of(context).getVariableText(
|
: null),
|
||||||
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),
|
|
||||||
),
|
|
||||||
])),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -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/flutter_flow_util.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/pages/preferences_settings_page/preferences_settings_model.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';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
@ -21,6 +22,7 @@ class _PreferencesPageWidgetState extends State<PreferencesPageWidget> {
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ChangeNotifierProvider<PreferencesPageModel>(
|
return ChangeNotifierProvider<PreferencesPageModel>(
|
||||||
|
@ -218,7 +220,7 @@ class _PreferencesPageWidgetState extends State<PreferencesPageWidget> {
|
||||||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||||
fontFamily: 'Nunito',
|
fontFamily: 'Nunito',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
fontStyle: FontStyle.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/helpers/storage_helper.dart';
|
||||||
|
|
||||||
import 'package:hub/shared/utils/biometric_util.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:percent_indicator/circular_percent_indicator.dart';
|
||||||
|
|
||||||
import 'package:qr_flutter/qr_flutter.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 smallerDimension = screenWidth < screenHeight ? screenWidth : screenHeight;
|
||||||
double dimension = smallerDimension * 0.75;
|
double dimension = smallerDimension * 0.75;
|
||||||
double totalTimeInSeconds = 100.0;
|
double totalTimeInSeconds = 100.0;
|
||||||
|
double limitedHeaderTextSize = LimitedFontSizeUtil.getCalculateFontSize(context, 18, 18, 16);
|
||||||
|
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
|
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
// top: true,
|
// top: true,
|
||||||
child: Column(
|
child: Center(
|
||||||
mainAxisSize: MainAxisSize.max,
|
child: SingleChildScrollView(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
child: Column(
|
||||||
children: [
|
mainAxisSize: MainAxisSize.max,
|
||||||
if (_model.isAccess == true && _model.key != null)
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
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(
|
|
||||||
children: [
|
children: [
|
||||||
if (_model.isAccess == true && _model.key != null)
|
if (_model.isAccess == true && _model.key != null)
|
||||||
Align(
|
Padding(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
padding: const EdgeInsets.fromLTRB(0, 0, 0 , 20),
|
||||||
child: InkWell(
|
child: Text(
|
||||||
onTap: () async {
|
FFLocalizations.of(context).getVariableText(
|
||||||
_resetAnimationAndToggleAccess();
|
ptText: 'Use esse QR Code para acesso',
|
||||||
log('isFingerprint: ${_model.isFingerprint}');
|
enText: 'Use this QR Code for access',
|
||||||
_model.isFingerprint ? await _showBiometricsAuth(context) : await _showQrCodeBottomSheet(context);
|
|
||||||
},
|
|
||||||
child: _model.buildQrCode(
|
|
||||||
dimension: dimension,
|
|
||||||
errorCorrectLevel: QrErrorCorrectLevel.M,
|
|
||||||
identifier: _model.userDevUUID,
|
|
||||||
pass: _model.key!,
|
|
||||||
direction: 5,
|
|
||||||
),
|
),
|
||||||
|
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)
|
Stack(
|
||||||
Align(
|
children: [
|
||||||
alignment: const AlignmentDirectional(0, 0),
|
if (_model.isAccess == true && _model.key != null)
|
||||||
child: BarcodeWidget(
|
Align(
|
||||||
data: 'Barcode',
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
barcode: Barcode.qrCode(),
|
child: InkWell(
|
||||||
width: 300.0,
|
onTap: () async {
|
||||||
height: 200.0,
|
safeSetState(() async {
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
_resetAnimationAndToggleAccess();
|
||||||
backgroundColor: Colors.transparent,
|
});
|
||||||
errorBuilder: (context, error) => const SizedBox(
|
|
||||||
width: 300.0,
|
_model.isFingerprint
|
||||||
height: 200.0,
|
? await _showBiometricsAuth(context)
|
||||||
|
: await _showQrCodeBottomSheet(context);
|
||||||
|
},
|
||||||
|
child: _model.buildQrCode(
|
||||||
|
dimension: dimension,
|
||||||
|
errorCorrectLevel: QrErrorCorrectLevel.M,
|
||||||
|
identifier: _model.userDevUUID,
|
||||||
|
pass: _model.key!,
|
||||||
|
direction: 5,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
drawText: false,
|
if (_model.isAccess == false && _model.key == null)
|
||||||
).animateOnActionTrigger(
|
Align(
|
||||||
animationsMap['barcodeOnActionTriggerAnimation']!,
|
alignment: const AlignmentDirectional(0, 0),
|
||||||
),
|
child: BarcodeWidget(
|
||||||
),
|
data: 'Barcode',
|
||||||
if (_model.isAccess == false && _model.key == null)
|
barcode: Barcode.qrCode(),
|
||||||
Align(
|
width: 300.0,
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
height: 200.0,
|
||||||
child: InkWell(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
splashColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
errorBuilder: (context, error) => const SizedBox(
|
||||||
hoverColor: Colors.transparent,
|
width: 300.0,
|
||||||
highlightColor: Colors.transparent,
|
height: 200.0,
|
||||||
onLongPress: () async {
|
),
|
||||||
await _model.qrCodeEncoder(
|
drawText: false,
|
||||||
context,
|
).animateOnActionTrigger(
|
||||||
key: _model.key,
|
animationsMap['barcodeOnActionTriggerAnimation']!,
|
||||||
);
|
),
|
||||||
setState(() {});
|
),
|
||||||
},
|
if (_model.isAccess == false && _model.key == null)
|
||||||
child: Container(
|
Align(
|
||||||
width: 200.0,
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
height: 200.0,
|
child: InkWell(
|
||||||
decoration: const BoxDecoration(),
|
splashColor: Colors.transparent,
|
||||||
child: Align(
|
focusColor: Colors.transparent,
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
hoverColor: Colors.transparent,
|
||||||
child: FFButtonWidget(
|
highlightColor: Colors.transparent,
|
||||||
onPressed: () async {
|
onLongPress: () async {
|
||||||
log('isFingerprint: ${_model.isFingerprint}');
|
await _model.qrCodeEncoder(
|
||||||
_model.isFingerprint
|
context,
|
||||||
? await _showBiometricsAuth(context)
|
key: _model.key,
|
||||||
: await _showQrCodeBottomSheet(context);
|
);
|
||||||
},
|
setState(() {});
|
||||||
text: FFLocalizations.of(context).getVariableText(
|
},
|
||||||
ptText: 'Gerar QR Code',
|
child: Container(
|
||||||
enText: 'Generate QR Code',
|
width: 200.0,
|
||||||
),
|
height: 200.0,
|
||||||
options: FFButtonOptions(
|
decoration: const BoxDecoration(),
|
||||||
height: 40.0,
|
child: Align(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
child: FFButtonWidget(
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
onPressed: () async {
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
_model.isFingerprint
|
||||||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
? await _showBiometricsAuth(context)
|
||||||
color: Colors.white,
|
: await _showQrCodeBottomSheet(context);
|
||||||
letterSpacing: 0.0,
|
},
|
||||||
useGoogleFonts:
|
text: FFLocalizations.of(context).getVariableText(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
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,
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
borderSide: const BorderSide(
|
),
|
||||||
color: Colors.transparent,
|
|
||||||
width: 1.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,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import 'package:hub/pages/reception_page/reception_page_model.dart';
|
||||||
import 'package:hub/shared/helpers/base_storage.dart';
|
import 'package:hub/shared/helpers/base_storage.dart';
|
||||||
import 'package:hub/shared/helpers/storage_helper.dart';
|
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||||
import 'package:hub/shared/services/localization/localization_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';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class ReceptionPageWidget extends StatefulWidget {
|
class ReceptionPageWidget extends StatefulWidget {
|
||||||
|
@ -55,6 +56,10 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
|
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
|
|
||||||
StorageHelper().context = context;
|
StorageHelper().context = context;
|
||||||
return ChangeNotifierProvider(
|
return ChangeNotifierProvider(
|
||||||
create: (context) => ReceptionPageModel(),
|
create: (context) => ReceptionPageModel(),
|
||||||
|
@ -69,7 +74,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(45, 0, 45, 15.0),
|
padding: const EdgeInsets.fromLTRB(45, 20, 45, 15.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Falta pouco para você utilizar o FRE Access Hub...',
|
ptText: 'Falta pouco para você utilizar o FRE Access Hub...',
|
||||||
|
@ -78,7 +83,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
||||||
style: FlutterFlowTheme.of(context).displayLarge.override(
|
style: FlutterFlowTheme.of(context).displayLarge.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
fontSize: 20.0,
|
fontSize: limitedHeaderFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
|
@ -87,7 +92,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
||||||
),
|
),
|
||||||
const AtomImageSvgTheme(filename: 'reception', width: 180, height: 180),
|
const AtomImageSvgTheme(filename: 'reception', width: 180, height: 180),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(70, 30, 70.0, 60),
|
padding: const EdgeInsets.fromLTRB(70, 30, 70.0, 40),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText:
|
ptText:
|
||||||
|
@ -97,7 +102,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
||||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||||
fontFamily: 'Nunito Sans',
|
fontFamily: 'Nunito Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: limitedBodyFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
|
@ -117,8 +122,9 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
||||||
enText: 'My Identifier'),
|
enText: 'My Identifier'),
|
||||||
textStyle: FlutterFlowTheme.of(context).labelSmall.override(
|
textStyle: FlutterFlowTheme.of(context).labelSmall.override(
|
||||||
fontFamily: 'Nunito Sans',
|
fontFamily: 'Nunito Sans',
|
||||||
color: FlutterFlowTheme.of(context).secondaryText,
|
color: FlutterFlowTheme.of(context)
|
||||||
fontSize: 10.0,
|
.secondaryText,
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
|
@ -129,14 +135,17 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
||||||
.getVariableText(ptText: 'Meu Identificador', enText: 'My Identifier'),
|
.getVariableText(ptText: 'Meu Identificador', enText: 'My Identifier'),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 44.0,
|
height:30,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
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,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily: 'Nunito Sans',
|
fontFamily: 'Nunito Sans',
|
||||||
color: FlutterFlowTheme.of(context).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
fontSize: 14.0,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
|
@ -153,7 +162,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(60, 0, 60, 0),
|
padding: const EdgeInsets.fromLTRB(60, 0, 60, 25),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
PhpGroup.unregisterDevice();
|
PhpGroup.unregisterDevice();
|
||||||
|
@ -177,14 +186,20 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
||||||
.getVariableText(ptText: 'Sair da Conta', enText: 'Logout'),
|
.getVariableText(ptText: 'Sair da Conta', enText: 'Logout'),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 44.0,
|
height: 30,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
0.0, 0.0, 0.0, 0.0),
|
||||||
color: FlutterFlowTheme.of(context).customColor1,
|
iconPadding:
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
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',
|
fontFamily: 'Nunito Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
fontSize: 14.0,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
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/base_storage.dart';
|
||||||
import 'package:hub/shared/helpers/storage_helper.dart';
|
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||||
import 'package:hub/shared/mixins/status_mixin.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 'package:share_plus/share_plus.dart';
|
||||||
|
|
||||||
import '../../shared/utils/validator_util.dart';
|
import '../../shared/utils/validator_util.dart';
|
||||||
|
@ -416,6 +417,7 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel<ScheduleComplete>
|
||||||
ptText: 'Cancelar',
|
ptText: 'Cancelar',
|
||||||
enText: 'Cancel',
|
enText: 'Cancel',
|
||||||
),
|
),
|
||||||
|
|
||||||
icon: const Icon(Icons.close),
|
icon: const Icon(Icons.close),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
showAlertDialog(
|
showAlertDialog(
|
||||||
|
@ -473,17 +475,19 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel<ScheduleComplete>
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 130,
|
width: MediaQuery.of(context).size.width * 0.3,
|
||||||
height: 40,
|
height: 40,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
||||||
),
|
),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
width: 1,
|
width: 1,
|
||||||
),
|
),
|
||||||
|
splashColor: const Color.fromARGB(132, 255, 17, 0),
|
||||||
// borderRadius: 12,
|
// borderRadius: 12,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -506,17 +510,19 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel<ScheduleComplete>
|
||||||
switchTab(0);
|
switchTab(0);
|
||||||
},
|
},
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 130,
|
width: MediaQuery.of(context).size.width * 0.5,
|
||||||
height: 40,
|
height: 40,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
||||||
),
|
),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
width: 1,
|
width: 1,
|
||||||
),
|
),
|
||||||
|
splashColor: const Color.fromARGB(137, 134, 134, 134),
|
||||||
// borderRadius: 12,
|
// borderRadius: 12,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -539,17 +545,19 @@ URL do Convite: https://visita.freaccess.com.br/${item['VAW_ID']}/$cliUUID/${ite
|
||||||
''');
|
''');
|
||||||
},
|
},
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 130,
|
width: MediaQuery.of(context).size.width * 0.3,
|
||||||
height: 40,
|
height: 40,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
||||||
),
|
),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
width: 1,
|
width: 1,
|
||||||
),
|
),
|
||||||
|
splashColor: const Color.fromARGB(136, 97, 160, 255),
|
||||||
// borderRadius: 12,
|
// 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/helpers/storage_helper.dart';
|
||||||
import 'package:hub/shared/mixins/status_mixin.dart';
|
import 'package:hub/shared/mixins/status_mixin.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
import 'package:hub/shared/utils/log_util.dart';
|
import 'package:hub/shared/utils/log_util.dart';
|
||||||
import 'package:hub/shared/utils/validator_util.dart';
|
import 'package:hub/shared/utils/validator_util.dart';
|
||||||
|
|
||||||
|
@ -115,6 +116,10 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
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),
|
duration: const Duration(seconds: 3),
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -124,6 +129,9 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
@ -136,7 +144,13 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: Text(FFLocalizations.of(context)
|
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:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.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_theme.dart';
|
||||||
import '../../../flutter_flow/flutter_flow_util.dart';
|
import '../../../flutter_flow/flutter_flow_util.dart';
|
||||||
|
@ -17,7 +18,8 @@ class AtomTermsOfUse extends StatelessWidget {
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: LimitedFontSizeUtil.getInputFontSize(
|
||||||
|
context),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
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:flutter/material.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
|
|
||||||
import '../../flutter_flow/flutter_flow_theme.dart';
|
import '../../flutter_flow/flutter_flow_theme.dart';
|
||||||
|
|
||||||
class SnackBarUtil {
|
class SnackBarUtil {
|
||||||
static void showSnackBar(BuildContext context, String text, {bool isError = false}) {
|
static void showSnackBar(BuildContext context, String text, {bool isError = false}) {
|
||||||
|
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
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,
|
backgroundColor: isError ? FlutterFlowTheme.of(context).error : FlutterFlowTheme.of(context).success,
|
||||||
duration: const Duration(seconds: 3),
|
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