feat: Ajuste na tela de Registro de Visitante e de QRCode
This commit is contained in:
parent
f543a200f1
commit
a58f535d6d
|
@ -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';
|
||||||
|
@ -52,13 +53,16 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
|
|
||||||
@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: LimitedTextSizeUtil.getScaledSizedBoxSize(context, 300, 570, 500, 300),
|
||||||
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,
|
||||||
|
@ -69,6 +73,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
topRight: Radius.circular(15.0),
|
topRight: Radius.circular(15.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
@ -112,7 +117,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
FlutterFlowTheme.of(context).bodyMedium.override(
|
FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: const Color(0xFF15161E),
|
color: const Color(0xFF15161E),
|
||||||
fontSize: 14.0,
|
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 16, 30, 14),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
@ -126,7 +131,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
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 */,
|
||||||
|
@ -134,7 +139,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontFamily: 'Outfit',
|
fontFamily: 'Outfit',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 24.0,
|
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 20, 38, 18),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
||||||
|
@ -151,7 +156,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14, 26, 12),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
|
@ -165,8 +170,6 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
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,
|
||||||
|
@ -189,11 +192,12 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
FlutterFlowTheme.of(context).labelMedium.override(
|
FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 10, 18, 8),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey('Plus Jakarta Sans'),
|
.containsKey('Plus Jakarta Sans'),
|
||||||
|
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText: FFLocalizations.of(context).getText(
|
||||||
'zz1haydj' /* digite a sua senha..... */,
|
'zz1haydj' /* digite a sua senha..... */,
|
||||||
|
@ -202,7 +206,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
FlutterFlowTheme.of(context).labelMedium.override(
|
FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 10, 18, 8),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
@ -258,7 +262,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
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: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 10, 18, 8),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
@ -281,12 +285,11 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
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 ||
|
if (_model.formKey.currentState == null ||
|
||||||
|
@ -312,7 +315,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 16.0,
|
fontSize: LimitedTextSizeUtil.getNoResizeFont(context, 15),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
@ -331,6 +334,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import 'package:flutter/services.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.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';
|
||||||
|
|
||||||
|
@ -33,7 +34,7 @@ class RegisiterVistorTemplateComponentWidget extends StatefulWidget {
|
||||||
class _RegisiterVistorTemplateComponentWidgetState
|
class _RegisiterVistorTemplateComponentWidgetState
|
||||||
extends State<RegisiterVistorTemplateComponentWidget> {
|
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;
|
||||||
|
@ -120,6 +121,9 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
double limitedTextSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 12.0, 22.0, 10.0 );
|
||||||
|
|
||||||
return Align(
|
return Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
|
@ -193,6 +197,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
.labelMediumFamily),
|
.labelMediumFamily),
|
||||||
|
fontSize: limitedTextSize,
|
||||||
),
|
),
|
||||||
hintStyle:
|
hintStyle:
|
||||||
FlutterFlowTheme.of(context).labelMedium.override(
|
FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
|
@ -202,6 +207,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context)
|
.containsKey(FlutterFlowTheme.of(context)
|
||||||
.labelMediumFamily),
|
.labelMediumFamily),
|
||||||
|
fontSize: limitedTextSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -243,6 +249,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedTextSize,
|
||||||
),
|
),
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
_model.debounce(() async {
|
_model.debounce(() async {
|
||||||
|
@ -330,6 +337,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedTextSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
.labelMedium
|
.labelMedium
|
||||||
|
@ -340,6 +348,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedTextSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -381,6 +390,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedTextSize,
|
||||||
),
|
),
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
maxLength: 80,
|
maxLength: 80,
|
||||||
|
@ -420,9 +430,11 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
.bodyMediumFamily),
|
.bodyMediumFamily),
|
||||||
|
fontSize: limitedTextSize,
|
||||||
),
|
),
|
||||||
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,
|
||||||
|
@ -451,8 +463,8 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
top: 5, start: 15),
|
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)
|
style: FlutterFlowTheme.of(context)
|
||||||
.bodySmall
|
.bodySmall
|
||||||
|
@ -466,6 +478,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
.containsKey(
|
.containsKey(
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
.bodySmallFamily),
|
.bodySmallFamily),
|
||||||
|
fontSize: limitedTextSize,
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -506,10 +519,13 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
} else {
|
} else {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Align(
|
GestureDetector(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
onTap: () async {
|
||||||
child: FFButtonWidget(
|
|
||||||
onPressed: () async {
|
setState(() {
|
||||||
|
_isLoading = true;
|
||||||
|
});
|
||||||
|
|
||||||
final selectedMedia =
|
final selectedMedia =
|
||||||
await selectMediaWithSourceBottomSheetandFaceDetection(
|
await selectMediaWithSourceBottomSheetandFaceDetection(
|
||||||
context: context,
|
context: context,
|
||||||
|
@ -562,6 +578,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
setState(() {
|
setState(() {
|
||||||
_model.uploadedLocalFile =
|
_model.uploadedLocalFile =
|
||||||
selectedUploadedFiles.first;
|
selectedUploadedFiles.first;
|
||||||
|
_isLoading = false;
|
||||||
});
|
});
|
||||||
final String message =
|
final String message =
|
||||||
FFLocalizations.of(context)
|
FFLocalizations.of(context)
|
||||||
|
@ -571,7 +588,9 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
);
|
);
|
||||||
showUploadMessage(context, message);
|
showUploadMessage(context, message);
|
||||||
} else {
|
} else {
|
||||||
setState(() {});
|
setState(() {
|
||||||
|
_isLoading = false;
|
||||||
|
});
|
||||||
final String message =
|
final String message =
|
||||||
FFLocalizations.of(context)
|
FFLocalizations.of(context)
|
||||||
.getVariableText(
|
.getVariableText(
|
||||||
|
@ -579,74 +598,79 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
ptText: 'Falha ao enviar os dados',
|
ptText: 'Falha ao enviar os dados',
|
||||||
);
|
);
|
||||||
showUploadMessage(context, message);
|
showUploadMessage(context, message);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}} else {
|
||||||
|
setState(() {
|
||||||
|
_isLoading = false;
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
text: '',
|
child: Center(
|
||||||
icon: Icon(
|
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,
|
Icons.photo_camera,
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primary,
|
||||||
size: 30.0,
|
size: 30.0,
|
||||||
),
|
),
|
||||||
options: FFButtonOptions(
|
Padding(
|
||||||
width: double.infinity,
|
padding:
|
||||||
height: 120.0,
|
const EdgeInsets.fromLTRB(0, 15, 0, 0),
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
child: Text(
|
||||||
0.0, 0.0, 0.0, 20.0),
|
FFLocalizations.of(context).getText(
|
||||||
iconPadding:
|
'p4ftwxcy',
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
),
|
||||||
14.0, 0.0, 0.0, 20.0),
|
textAlign: TextAlign.center,
|
||||||
color: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context)
|
||||||
.primaryBackground,
|
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
|
||||||
.titleSmall
|
.titleSmall
|
||||||
.override(
|
.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
.titleSmallFamily,
|
.titleSmallFamily,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
.primaryText,
|
.primaryText,
|
||||||
fontSize: 16.0,
|
fontSize: limitedTextSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
.titleSmallFamily),
|
.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),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -706,6 +730,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedTextSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
.labelMedium
|
.labelMedium
|
||||||
|
@ -716,6 +741,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedTextSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -757,6 +783,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedTextSize,
|
||||||
),
|
),
|
||||||
// validator:
|
// validator:
|
||||||
// _model.textController3Validator.asValidator(context),
|
// _model.textController3Validator.asValidator(context),
|
||||||
|
@ -793,6 +820,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedTextSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
.labelMedium
|
.labelMedium
|
||||||
|
@ -803,6 +831,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedTextSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -844,6 +873,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedTextSize,
|
||||||
),
|
),
|
||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType.emailAddress,
|
||||||
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
||||||
|
@ -899,7 +929,10 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
'Visitor successfully registered.'),
|
'Visitor successfully registered.'),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
.info)),
|
.info,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
FlutterFlowTheme.of(context).primary,
|
FlutterFlowTheme.of(context).primary,
|
||||||
duration: const Duration(seconds: 3),
|
duration: const Duration(seconds: 3),
|
||||||
|
@ -960,6 +993,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).titleSmallFamily),
|
FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
|
fontSize: LimitedTextSizeUtil.getNoResizeFont(context, 15)
|
||||||
),
|
),
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
|
|
|
@ -16,6 +16,7 @@ import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/pages/qr_code_page/qr_code_page_model.dart';
|
import 'package:hub/pages/qr_code_page/qr_code_page_model.dart';
|
||||||
|
|
||||||
import 'package:hub/shared/utils/biometric_util.dart';
|
import 'package:hub/shared/utils/biometric_util.dart';
|
||||||
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
import 'package:hub/shared/utils/storage_util.dart';
|
import 'package:hub/shared/utils/storage_util.dart';
|
||||||
import 'package:percent_indicator/circular_percent_indicator.dart';
|
import 'package:percent_indicator/circular_percent_indicator.dart';
|
||||||
|
|
||||||
|
@ -109,6 +110,9 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget>
|
||||||
screenWidth < screenHeight ? screenWidth : screenHeight;
|
screenWidth < screenHeight ? screenWidth : screenHeight;
|
||||||
double dimension = smallerDimension * 0.75;
|
double dimension = smallerDimension * 0.75;
|
||||||
double totalTimeInSeconds = 100.0;
|
double totalTimeInSeconds = 100.0;
|
||||||
|
double limitedHeaderTextSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 20.0, 38, 18);
|
||||||
|
double limitedBodyTextSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14.0, 22, 12);
|
||||||
|
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
// top: true,
|
// top: true,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
@ -123,11 +127,12 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget>
|
||||||
),
|
),
|
||||||
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,
|
fontSize: limitedHeaderTextSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Stack(
|
Stack(
|
||||||
|
@ -221,6 +226,7 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget>
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context)
|
.containsKey(FlutterFlowTheme.of(context)
|
||||||
.titleSmallFamily),
|
.titleSmallFamily),
|
||||||
|
fontSize: LimitedTextSizeUtil.getNoResizeFont(context, 14),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
|
@ -255,6 +261,7 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget>
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedBodyTextSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -291,6 +298,7 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget>
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
.bodyMediumFamily),
|
.bodyMediumFamily),
|
||||||
|
fontSize: limitedBodyTextSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -224,7 +224,8 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
final textScaler = MediaQuery.textScalerOf(context);
|
final textScaler = MediaQuery.textScalerOf(context);
|
||||||
final double baseFontSize = 12.0;
|
final double baseFontSize = 12.0;
|
||||||
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
||||||
final double limitedFontSize = scaledFontSize > 16.0 ? 10 : baseFontSize;
|
final double limitedFontSize = LimitedTextSizeUtil.getLimitedBodyFontSize(
|
||||||
|
context, 12, 12, 10.0);
|
||||||
final double scaledSizedBoxSize = scaledFontSize > 16.0 ? 100 : 80;
|
final double scaledSizedBoxSize = scaledFontSize > 16.0 ? 100 : 80;
|
||||||
|
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
|
@ -317,7 +318,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
.accent4,
|
.customColor6,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
@ -574,7 +575,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color:
|
||||||
FlutterFlowTheme.of(context).accent4,
|
FlutterFlowTheme.of(context).customColor6,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
@ -924,21 +925,17 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
: FocusScope.of(context).unfocus(),
|
: FocusScope.of(context).unfocus(),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: MediaQuery.of(context).size.height *
|
height: MediaQuery.of(context).size.height *
|
||||||
0.7,
|
0.8,
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
child:
|
child: VisitorSearchModalTemplateComponentWidget(
|
||||||
VisitorSearchModalTemplateComponentWidget(
|
|
||||||
getVisitors: (visitorsParam) async {
|
getVisitors: (visitorsParam) async {
|
||||||
model.visitorJsonList = visitorsParam!
|
model.visitorJsonList = visitorsParam!.toList().cast<dynamic>();
|
||||||
.toList()
|
|
||||||
.cast<dynamic>();
|
|
||||||
safeSetState(() {});
|
safeSetState(() {});
|
||||||
},
|
},
|
||||||
getDocs: (docsParam) async {
|
getDocs: (docsParam) async {
|
||||||
model.visitorStrList =
|
model.visitorStrList = strListToStr(docsParam!.toList());
|
||||||
strListToStr(docsParam!.toList());
|
|
||||||
safeSetState(() {});
|
safeSetState(() {});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -957,7 +954,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: FlutterFlowTheme.of(context).accent4,
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1124,7 +1121,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
elevation: 2.0,
|
elevation: 2.0,
|
||||||
borderColor:
|
borderColor:
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
.accent4,
|
.customColor6,
|
||||||
borderWidth: 0.5,
|
borderWidth: 0.5,
|
||||||
borderRadius: 10.0,
|
borderRadius: 10.0,
|
||||||
margin: const EdgeInsetsDirectional
|
margin: const EdgeInsetsDirectional
|
||||||
|
@ -1245,7 +1242,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
elevation: 2.0,
|
elevation: 2.0,
|
||||||
borderColor:
|
borderColor:
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
.accent4,
|
.customColor6,
|
||||||
borderWidth: 0.5,
|
borderWidth: 0.5,
|
||||||
borderRadius: 10.0,
|
borderRadius: 10.0,
|
||||||
margin: const EdgeInsetsDirectional
|
margin: const EdgeInsetsDirectional
|
||||||
|
@ -1469,7 +1466,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).accent4,
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
|
Loading…
Reference in New Issue