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/shared/utils/limited_text_size.dart';
|
||||
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
|
@ -52,13 +53,16 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 300.0,
|
||||
height: LimitedTextSizeUtil.getScaledSizedBoxSize(context, 300, 570, 500, 300),
|
||||
constraints: const BoxConstraints(
|
||||
minHeight: 300.0,
|
||||
maxWidth: 570.0,
|
||||
maxHeight: 500,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
|
@ -69,104 +73,103 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
topRight: Radius.circular(15.0),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// This row exists for when the "app bar" is hidden on desktop, having a way back for the user can work well.
|
||||
if (responsiveVisibility(
|
||||
context: context,
|
||||
phone: false,
|
||||
tablet: false,
|
||||
))
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.safePop();
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 12.0, 0.0, 12.0),
|
||||
child: Icon(
|
||||
Icons.arrow_back_rounded,
|
||||
color: Color(0xFF15161E),
|
||||
size: 24.0,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// This row exists for when the "app bar" is hidden on desktop, having a way back for the user can work well.
|
||||
if (responsiveVisibility(
|
||||
context: context,
|
||||
phone: false,
|
||||
tablet: false,
|
||||
))
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.safePop();
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 12.0, 0.0, 12.0),
|
||||
child: Icon(
|
||||
Icons.arrow_back_rounded,
|
||||
color: Color(0xFF15161E),
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
12.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
'',
|
||||
style:
|
||||
FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
12.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
'',
|
||||
style:
|
||||
FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 16, 30, 14),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'h1xilful' /* DIGITE A SUA SENHA */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Outfit',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 24.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'ujodm2ci' /* Para gerar o QR Code digite a ... */,
|
||||
),
|
||||
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(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 10.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'h1xilful' /* DIGITE A SUA SENHA */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Outfit',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 20, 38, 18),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'ujodm2ci' /* Para gerar o QR Code digite a ... */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14, 26, 12),
|
||||
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: TextFormField(
|
||||
controller: _model.keyTextFieldTextController,
|
||||
focusNode: _model.keyTextFieldFocusNode,
|
||||
|
@ -189,11 +192,12 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 10, 18, 8),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'zz1haydj' /* digite a sua senha..... */,
|
||||
|
@ -202,7 +206,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 10, 18, 8),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -258,7 +262,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
fontSize: LimitedTextSizeUtil.getLimitedBodyFontSize(context, 10, 18, 8),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
|
@ -281,54 +285,54 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
if (_model.formKey.currentState == null ||
|
||||
!_model.formKey.currentState!.validate()) {
|
||||
return;
|
||||
}
|
||||
await widget.toggleActionStatus?.call(
|
||||
_model.keyTextFieldTextController.text,
|
||||
);
|
||||
context.pop();
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'2cybbi5p' /* Enviar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: 270.0,
|
||||
height: 50.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: const Color(0xFF1AAB5F),
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 15),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
if (_model.formKey.currentState == null ||
|
||||
!_model.formKey.currentState!.validate()) {
|
||||
return;
|
||||
}
|
||||
await widget.toggleActionStatus?.call(
|
||||
_model.keyTextFieldTextController.text,
|
||||
);
|
||||
context.pop();
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'2cybbi5p' /* Enviar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: 270.0,
|
||||
height: 50.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: const Color(0xFF1AAB5F),
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: LimitedTextSizeUtil.getNoResizeFont(context, 15),
|
||||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:flutter/services.dart';
|
|||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/shared/utils/image_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:hub/shared/utils/validator_util.dart';
|
||||
import 'package:rxdart/rxdart.dart';
|
||||
|
||||
|
@ -33,7 +34,7 @@ class RegisiterVistorTemplateComponentWidget extends StatefulWidget {
|
|||
class _RegisiterVistorTemplateComponentWidgetState
|
||||
extends State<RegisiterVistorTemplateComponentWidget> {
|
||||
late RegisiterVistorTemplateComponentModel _model;
|
||||
|
||||
bool _isLoading = false;
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
bool _isVisitorRegistered = false;
|
||||
|
@ -120,6 +121,9 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
double limitedTextSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 12.0, 22.0, 10.0 );
|
||||
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Container(
|
||||
|
@ -193,6 +197,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
),
|
||||
hintStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
|
@ -202,6 +207,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -243,6 +249,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
),
|
||||
onChanged: (value) {
|
||||
_model.debounce(() async {
|
||||
|
@ -330,6 +337,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
|
@ -340,6 +348,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -381,6 +390,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
),
|
||||
maxLines: null,
|
||||
maxLength: 80,
|
||||
|
@ -420,9 +430,11 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'pmezihb4' /* Selecione... */,
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Visitor Type',
|
||||
ptText: 'Tipo de Visitante',
|
||||
),
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_down_rounded,
|
||||
|
@ -451,8 +463,8 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
top: 5, start: 15),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'This field is required',
|
||||
ptText: 'Este campo é obrigatório',
|
||||
enText: 'Select the type of visitor',
|
||||
ptText: 'Selecione o tipo de visitante',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodySmall
|
||||
|
@ -466,6 +478,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodySmallFamily),
|
||||
fontSize: limitedTextSize,
|
||||
)),
|
||||
),
|
||||
],
|
||||
|
@ -505,11 +518,14 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
);
|
||||
} else {
|
||||
return Stack(
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
|
||||
final selectedMedia =
|
||||
await selectMediaWithSourceBottomSheetandFaceDetection(
|
||||
context: context,
|
||||
|
@ -562,6 +578,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
setState(() {
|
||||
_model.uploadedLocalFile =
|
||||
selectedUploadedFiles.first;
|
||||
_isLoading = false;
|
||||
});
|
||||
final String message =
|
||||
FFLocalizations.of(context)
|
||||
|
@ -571,7 +588,9 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
);
|
||||
showUploadMessage(context, message);
|
||||
} else {
|
||||
setState(() {});
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
final String message =
|
||||
FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
|
@ -579,75 +598,80 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
ptText: 'Falha ao enviar os dados',
|
||||
);
|
||||
showUploadMessage(context, message);
|
||||
|
||||
return;
|
||||
}
|
||||
}} else {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
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),
|
||||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
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),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
_isLoading
|
||||
? SizedBox(
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
child: CircularProgressIndicator(
|
||||
valueColor:
|
||||
AlwaysStoppedAnimation<Color>(
|
||||
FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
),
|
||||
),
|
||||
)
|
||||
: Icon(
|
||||
Icons.photo_camera,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
size: 30.0,
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.fromLTRB(0, 15, 0, 0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'p4ftwxcy',
|
||||
),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: limitedTextSize,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
),
|
||||
),
|
||||
]
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
|
@ -706,6 +730,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
|
@ -716,6 +741,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -757,6 +783,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
),
|
||||
// validator:
|
||||
// _model.textController3Validator.asValidator(context),
|
||||
|
@ -793,6 +820,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
|
@ -803,6 +831,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -844,6 +873,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedTextSize,
|
||||
),
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
||||
|
@ -899,7 +929,10 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
'Visitor successfully registered.'),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.info)),
|
||||
.info,
|
||||
)
|
||||
),
|
||||
|
||||
backgroundColor:
|
||||
FlutterFlowTheme.of(context).primary,
|
||||
duration: const Duration(seconds: 3),
|
||||
|
@ -960,6 +993,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
fontSize: LimitedTextSizeUtil.getNoResizeFont(context, 15)
|
||||
),
|
||||
borderSide: const BorderSide(
|
||||
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/shared/utils/biometric_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:hub/shared/utils/storage_util.dart';
|
||||
import 'package:percent_indicator/circular_percent_indicator.dart';
|
||||
|
||||
|
@ -109,6 +110,9 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget>
|
|||
screenWidth < screenHeight ? screenWidth : screenHeight;
|
||||
double dimension = smallerDimension * 0.75;
|
||||
double totalTimeInSeconds = 100.0;
|
||||
double limitedHeaderTextSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 20.0, 38, 18);
|
||||
double limitedBodyTextSize = LimitedTextSizeUtil.getLimitedBodyFontSize(context, 14.0, 22, 12);
|
||||
|
||||
return SafeArea(
|
||||
// top: true,
|
||||
child: Column(
|
||||
|
@ -123,11 +127,12 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget>
|
|||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: 20.0,
|
||||
fontSize: limitedHeaderTextSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
|
||||
),
|
||||
),
|
||||
Stack(
|
||||
|
@ -221,6 +226,7 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget>
|
|||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily),
|
||||
fontSize: LimitedTextSizeUtil.getNoResizeFont(context, 14),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
|
@ -255,6 +261,7 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget>
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyTextSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -291,6 +298,7 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget>
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedBodyTextSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -224,7 +224,8 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double baseFontSize = 12.0;
|
||||
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;
|
||||
|
||||
return SingleChildScrollView(
|
||||
|
@ -317,7 +318,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.accent4,
|
||||
.customColor6,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
|
@ -574,7 +575,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
FlutterFlowTheme.of(context).accent4,
|
||||
FlutterFlowTheme.of(context).customColor6,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
|
@ -924,23 +925,19 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
: FocusScope.of(context).unfocus(),
|
||||
child: SizedBox(
|
||||
height: MediaQuery.of(context).size.height *
|
||||
0.7,
|
||||
0.8,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child:
|
||||
VisitorSearchModalTemplateComponentWidget(
|
||||
getVisitors: (visitorsParam) async {
|
||||
model.visitorJsonList = visitorsParam!
|
||||
.toList()
|
||||
.cast<dynamic>();
|
||||
safeSetState(() {});
|
||||
},
|
||||
getDocs: (docsParam) async {
|
||||
model.visitorStrList =
|
||||
strListToStr(docsParam!.toList());
|
||||
safeSetState(() {});
|
||||
},
|
||||
child: VisitorSearchModalTemplateComponentWidget(
|
||||
getVisitors: (visitorsParam) async {
|
||||
model.visitorJsonList = visitorsParam!.toList().cast<dynamic>();
|
||||
safeSetState(() {});
|
||||
},
|
||||
getDocs: (docsParam) async {
|
||||
model.visitorStrList = strListToStr(docsParam!.toList());
|
||||
safeSetState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -957,7 +954,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).accent4,
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
width: 1.0,
|
||||
),
|
||||
),
|
||||
|
@ -1124,7 +1121,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
elevation: 2.0,
|
||||
borderColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.accent4,
|
||||
.customColor6,
|
||||
borderWidth: 0.5,
|
||||
borderRadius: 10.0,
|
||||
margin: const EdgeInsetsDirectional
|
||||
|
@ -1245,7 +1242,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
elevation: 2.0,
|
||||
borderColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.accent4,
|
||||
.customColor6,
|
||||
borderWidth: 0.5,
|
||||
borderRadius: 10.0,
|
||||
margin: const EdgeInsetsDirectional
|
||||
|
@ -1469,7 +1466,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent4,
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
|
|
Loading…
Reference in New Issue