dart format
This commit is contained in:
parent
3c106d6957
commit
b1d6cf7957
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -6,7 +6,11 @@ class AtomImageSvgTheme extends StatelessWidget {
|
||||||
final double width;
|
final double width;
|
||||||
final double height;
|
final double height;
|
||||||
|
|
||||||
const AtomImageSvgTheme({super.key, required this.filename, required this.width, required this.height});
|
const AtomImageSvgTheme(
|
||||||
|
{super.key,
|
||||||
|
required this.filename,
|
||||||
|
required this.width,
|
||||||
|
required this.height});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
|
@ -65,7 +65,8 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
||||||
fontSize: 32.0,
|
fontSize: 32.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).headlineLargeFamily),
|
||||||
),
|
),
|
||||||
pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
pickerForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
pickerForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
@ -88,19 +89,27 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
||||||
child!,
|
child!,
|
||||||
headerBackgroundColor: FlutterFlowTheme.of(context).primary,
|
headerBackgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
headerForegroundColor: FlutterFlowTheme.of(context).info,
|
headerForegroundColor: FlutterFlowTheme.of(context).info,
|
||||||
headerTextStyle: FlutterFlowTheme.of(context).headlineLarge.override(
|
headerTextStyle:
|
||||||
fontFamily: FlutterFlowTheme.of(context).headlineLargeFamily,
|
FlutterFlowTheme.of(context).headlineLarge.override(
|
||||||
fontSize: 32.0,
|
fontFamily:
|
||||||
letterSpacing: 0.0,
|
FlutterFlowTheme.of(context).headlineLargeFamily,
|
||||||
fontWeight: FontWeight.w600,
|
fontSize: 32.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
|
letterSpacing: 0.0,
|
||||||
),
|
fontWeight: FontWeight.w600,
|
||||||
pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).headlineLargeFamily),
|
||||||
|
),
|
||||||
|
pickerBackgroundColor:
|
||||||
|
FlutterFlowTheme.of(context).primaryBackground,
|
||||||
pickerForegroundColor: FlutterFlowTheme.of(context).info,
|
pickerForegroundColor: FlutterFlowTheme.of(context).info,
|
||||||
selectedDateTimeBackgroundColor: FlutterFlowTheme.of(context).primary,
|
selectedDateTimeBackgroundColor:
|
||||||
selectedDateTimeForegroundColor: FlutterFlowTheme.of(context).info,
|
FlutterFlowTheme.of(context).primary,
|
||||||
pickerDialForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
selectedDateTimeForegroundColor:
|
||||||
actionButtonForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
FlutterFlowTheme.of(context).info,
|
||||||
|
pickerDialForegroundColor:
|
||||||
|
FlutterFlowTheme.of(context).primaryText,
|
||||||
|
actionButtonForegroundColor:
|
||||||
|
FlutterFlowTheme.of(context).primaryText,
|
||||||
iconSize: 24.0,
|
iconSize: 24.0,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -157,7 +166,8 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: widget.controller,
|
controller: widget.controller,
|
||||||
focusNode: widget.focusNode,
|
focusNode: widget.focusNode,
|
||||||
|
@ -167,20 +177,26 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintText: widget.hintText,
|
hintText: widget.hintText,
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
lineHeight: 1.0,
|
lineHeight: 1.0,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
|
@ -217,9 +233,11 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
lineHeight: 1.8,
|
lineHeight: 1.8,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
|
@ -227,7 +245,8 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
|
|
@ -52,7 +52,8 @@ class _CustomSelectState extends State<CustomSelect> {
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
height: 48.0,
|
height: 48.0,
|
||||||
|
@ -66,11 +67,14 @@ class _CustomSelectState extends State<CustomSelect> {
|
||||||
isMultiSelect: false,
|
isMultiSelect: false,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
textStyle: FlutterFlowTheme.of(context).bodyMedium.override(
|
textStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintText: widget.hintText,
|
hintText: widget.hintText,
|
||||||
|
@ -83,7 +87,8 @@ class _CustomSelectState extends State<CustomSelect> {
|
||||||
borderColor: FlutterFlowTheme.of(context).customColor6,
|
borderColor: FlutterFlowTheme.of(context).customColor6,
|
||||||
borderWidth: 0.5,
|
borderWidth: 0.5,
|
||||||
borderRadius: 10.0,
|
borderRadius: 10.0,
|
||||||
margin: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 16.0, 0.0),
|
margin: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
12.0, 0.0, 16.0, 0.0),
|
||||||
hidesUnderline: true,
|
hidesUnderline: true,
|
||||||
isOverButton: true,
|
isOverButton: true,
|
||||||
isSearchable: false,
|
isSearchable: false,
|
||||||
|
@ -96,25 +101,32 @@ class _CustomSelectState extends State<CustomSelect> {
|
||||||
if (widget.isRequired)
|
if (widget.isRequired)
|
||||||
if (widget.dropDownValue == null || widget.dropDownValue == '')
|
if (widget.dropDownValue == null || widget.dropDownValue == '')
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
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: 'This field is required',
|
||||||
ptText: 'Este campo é obrigatório',
|
ptText: 'Este campo é obrigatório',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
.bodySmall
|
||||||
color: FlutterFlowTheme.of(context).customColor6,
|
.override(
|
||||||
letterSpacing: 0.0,
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
useGoogleFonts:
|
.bodySmallFamily,
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
color:
|
||||||
fontSize: limitedInputFontSize)),
|
FlutterFlowTheme.of(context).customColor6,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context)
|
||||||
|
.bodySmallFamily),
|
||||||
|
fontSize: limitedInputFontSize)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -37,7 +37,8 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
|
|
||||||
return Builder(
|
return Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if (widget.uploadedFiles != null && widget.uploadedFiles!.bytes!.isNotEmpty) {
|
if (widget.uploadedFiles != null &&
|
||||||
|
widget.uploadedFiles!.bytes!.isNotEmpty) {
|
||||||
{
|
{
|
||||||
return InkWell(
|
return InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
|
@ -47,7 +48,8 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.isUploading = false;
|
widget.isUploading = false;
|
||||||
widget.uploadedFiles = FFUploadedFile(bytes: Uint8List.fromList([]));
|
widget.uploadedFiles =
|
||||||
|
FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||||
widget.onUploadComplete(widget.uploadedFiles!);
|
widget.onUploadComplete(widget.uploadedFiles!);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -72,7 +74,8 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
setState(() {
|
setState(() {
|
||||||
_isLoading = true;
|
_isLoading = true;
|
||||||
});
|
});
|
||||||
final selectedMedia = await selectMediaWithSourceBottomSheet(
|
final selectedMedia =
|
||||||
|
await selectMediaWithSourceBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
imageQuality: 100,
|
imageQuality: 100,
|
||||||
allowPhoto: true,
|
allowPhoto: true,
|
||||||
|
@ -84,7 +87,9 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final message = FFLocalizations.of(context)
|
final message = FFLocalizations.of(context)
|
||||||
.getVariableText(enText: 'Uploading file...', ptText: 'Enviando arquivo...');
|
.getVariableText(
|
||||||
|
enText: 'Uploading file...',
|
||||||
|
ptText: 'Enviando arquivo...');
|
||||||
showUploadMessage(
|
showUploadMessage(
|
||||||
context,
|
context,
|
||||||
message,
|
message,
|
||||||
|
@ -103,20 +108,24 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||||
widget.isUploading = false;
|
widget.isUploading = false;
|
||||||
}
|
}
|
||||||
if (selectedUploadedFiles.length == selectedMedia.length) {
|
if (selectedUploadedFiles.length ==
|
||||||
|
selectedMedia.length) {
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.uploadedFiles = selectedUploadedFiles.first;
|
widget.uploadedFiles = selectedUploadedFiles.first;
|
||||||
});
|
});
|
||||||
widget.onUploadComplete(widget.uploadedFiles!);
|
widget.onUploadComplete(widget.uploadedFiles!);
|
||||||
final message =
|
final message = FFLocalizations.of(context)
|
||||||
FFLocalizations.of(context).getVariableText(enText: 'Success!', ptText: 'Sucesso!');
|
.getVariableText(
|
||||||
|
enText: 'Success!', ptText: 'Sucesso!');
|
||||||
showUploadMessage(context, message);
|
showUploadMessage(context, message);
|
||||||
} else {
|
} else {
|
||||||
setState(() {
|
setState(() {
|
||||||
_isLoading = false;
|
_isLoading = false;
|
||||||
});
|
});
|
||||||
final message = FFLocalizations.of(context)
|
final message = FFLocalizations.of(context)
|
||||||
.getVariableText(enText: 'Failed to upload data', ptText: 'Falha ao enviar dados');
|
.getVariableText(
|
||||||
|
enText: 'Failed to upload data',
|
||||||
|
ptText: 'Falha ao enviar dados');
|
||||||
showUploadMessage(context, message);
|
showUploadMessage(context, message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -163,13 +172,19 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
'p4ftwxcy',
|
'p4ftwxcy',
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: FlutterFlowTheme.of(context).titleSmall.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
.titleSmall
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.titleSmallFamily,
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryText,
|
||||||
fontSize: limitedInputTextSize,
|
fontSize: limitedInputTextSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.titleSmallFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
|
@ -30,7 +30,8 @@ class SubmitButtonUtil extends StatelessWidget {
|
||||||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
color: FlutterFlowTheme.of(context).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
),
|
),
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
|
|
|
@ -41,7 +41,8 @@ class TabViewUtil extends StatelessWidget {
|
||||||
fontFamily: FlutterFlowTheme.of(context).titleMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).titleMediumFamily,
|
||||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
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),
|
||||||
),
|
),
|
||||||
unselectedLabelStyle: const TextStyle(),
|
unselectedLabelStyle: const TextStyle(),
|
||||||
indicatorColor: FlutterFlowTheme.of(context).primary,
|
indicatorColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
|
|
@ -19,7 +19,8 @@ class AtomTermsOfUse extends StatelessWidget {
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
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),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () => launchURL('https://freaccess.com.br/pp'),
|
onTap: () => launchURL('https://freaccess.com.br/pp'),
|
||||||
|
|
|
@ -2,7 +2,8 @@ import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'text_field_component_widget.dart' show TextFieldComponentWidget;
|
import 'text_field_component_widget.dart' show TextFieldComponentWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class TextFieldComponentModel extends FlutterFlowModel<TextFieldComponentWidget> {
|
class TextFieldComponentModel
|
||||||
|
extends FlutterFlowModel<TextFieldComponentWidget> {
|
||||||
/// State fields for stateful widgets in this component.
|
/// State fields for stateful widgets in this component.
|
||||||
|
|
||||||
// State field(s) for TextField widget.
|
// State field(s) for TextField widget.
|
||||||
|
|
|
@ -20,7 +20,8 @@ class TextFieldComponentWidget extends StatefulWidget {
|
||||||
final String? hintTextStrParam;
|
final String? hintTextStrParam;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<TextFieldComponentWidget> createState() => _TextFieldComponentWidgetState();
|
State<TextFieldComponentWidget> createState() =>
|
||||||
|
_TextFieldComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _TextFieldComponentWidgetState extends State<TextFieldComponentWidget> {
|
class _TextFieldComponentWidgetState extends State<TextFieldComponentWidget> {
|
||||||
|
@ -37,7 +38,8 @@ class _TextFieldComponentWidgetState extends State<TextFieldComponentWidget> {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(context, () => TextFieldComponentModel());
|
_model = createModel(context, () => TextFieldComponentModel());
|
||||||
|
|
||||||
_model.textController ??= TextEditingController(text: widget.initialValueStrParam);
|
_model.textController ??=
|
||||||
|
TextEditingController(text: widget.initialValueStrParam);
|
||||||
_model.textFieldFocusNode ??= FocusNode();
|
_model.textFieldFocusNode ??= FocusNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,14 +65,16 @@ class _TextFieldComponentWidgetState extends State<TextFieldComponentWidget> {
|
||||||
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),
|
||||||
),
|
),
|
||||||
hintText: widget.hintTextStrParam,
|
hintText: widget.hintTextStrParam,
|
||||||
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),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -105,7 +109,8 @@ class _TextFieldComponentWidgetState extends State<TextFieldComponentWidget> {
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).secondaryText,
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
validator: _model.textControllerValidator.asValidator(context),
|
validator: _model.textControllerValidator.asValidator(context),
|
||||||
),
|
),
|
||||||
|
|
|
@ -3,7 +3,8 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class OptionSelectionModalModel extends FlutterFlowModel<OptionSelectionModalWidget> {
|
class OptionSelectionModalModel
|
||||||
|
extends FlutterFlowModel<OptionSelectionModalWidget> {
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,12 @@ class OptionSelectionModalWidget extends StatefulWidget {
|
||||||
final List<String>? nameListStr;
|
final List<String>? nameListStr;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<OptionSelectionModalWidget> createState() => _OptionSelectionModalWidgetState();
|
State<OptionSelectionModalWidget> createState() =>
|
||||||
|
_OptionSelectionModalWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget> with TickerProviderStateMixin {
|
class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
||||||
|
with TickerProviderStateMixin {
|
||||||
late OptionSelectionModalModel _model;
|
late OptionSelectionModalModel _model;
|
||||||
|
|
||||||
final animationsMap = <String, AnimationInfo>{};
|
final animationsMap = <String, AnimationInfo>{};
|
||||||
|
@ -90,14 +92,17 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
context.pop();
|
context.pop();
|
||||||
if (widget.routesListStr![optionsListIndex] == 'scheduleCompleteVisitPage') {
|
if (widget.routesListStr![optionsListIndex] ==
|
||||||
|
'scheduleCompleteVisitPage') {
|
||||||
// Navegação para a página ScheduleCompleteVisitPage com queryParameters
|
// Navegação para a página ScheduleCompleteVisitPage com queryParameters
|
||||||
context.go(
|
context.go(
|
||||||
'/scheduleCompleteVisitPage',
|
'/scheduleCompleteVisitPage',
|
||||||
extra: {
|
extra: {
|
||||||
'visitStartDateStr': DateFormat('yyyy-MM-dd HH:mm:ss').format(DateTime.now()),
|
'visitStartDateStr': DateFormat('yyyy-MM-dd HH:mm:ss')
|
||||||
'visitEndDateStr':
|
.format(DateTime.now()),
|
||||||
DateFormat('yyyy-MM-dd HH:mm:ss').format(DateTime.now().add(const Duration(days: 1))),
|
'visitEndDateStr': DateFormat('yyyy-MM-dd HH:mm:ss')
|
||||||
|
.format(
|
||||||
|
DateTime.now().add(const Duration(days: 1))),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -144,20 +149,27 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 0.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 0.0, 0.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(
|
||||||
|
0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
widget.iconsListIcon![optionsListIndex]!,
|
widget.iconsListIcon![
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
optionsListIndex]!,
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.accent1,
|
||||||
size: 34.0,
|
size: 34.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -174,16 +186,21 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.nameListStr![optionsListIndex],
|
widget.nameListStr![optionsListIndex],
|
||||||
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: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey('Nunito'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -15,7 +15,8 @@ class OrderFilterModalModel extends FlutterFlowModel<OrderFilterModalWidget> {
|
||||||
// State field(s) for CheckboxGroup widget.
|
// State field(s) for CheckboxGroup widget.
|
||||||
FormFieldController<List<String>>? checkboxGroupValueController;
|
FormFieldController<List<String>>? checkboxGroupValueController;
|
||||||
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
||||||
set checkboxGroupValues(List<String>? v) => checkboxGroupValueController?.value = v;
|
set checkboxGroupValues(List<String>? v) =>
|
||||||
|
checkboxGroupValueController?.value = v;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
@ -25,4 +26,4 @@ class OrderFilterModalModel extends FlutterFlowModel<OrderFilterModalWidget> {
|
||||||
textFieldFocusNode?.dispose();
|
textFieldFocusNode?.dispose();
|
||||||
textController?.dispose();
|
textController?.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,22 +28,25 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
late Map<String, dynamic> selected;
|
late Map<String, dynamic> selected;
|
||||||
final List<Map<String, String>> adresseeTypeOptions = [
|
final List<Map<String, String>> adresseeTypeOptions = [
|
||||||
{
|
{
|
||||||
'title': FFLocalizations.of(navigatorKey.currentContext!).getVariableText(enText: 'Resident', ptText: 'Morador'),
|
'title': FFLocalizations.of(navigatorKey.currentContext!)
|
||||||
|
.getVariableText(enText: 'Resident', ptText: 'Morador'),
|
||||||
'value': 'MOR'
|
'value': 'MOR'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': FFLocalizations.of(navigatorKey.currentContext!).getVariableText(enText: 'Property', ptText: 'Propriedade'),
|
'title': FFLocalizations.of(navigatorKey.currentContext!)
|
||||||
|
.getVariableText(enText: 'Property', ptText: 'Propriedade'),
|
||||||
'value': 'PRO'
|
'value': 'PRO'
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
final List<Map<String, String>> statusOptions = [
|
final List<Map<String, String>> statusOptions = [
|
||||||
{
|
{
|
||||||
'title': FFLocalizations.of(navigatorKey.currentContext!)
|
'title': FFLocalizations.of(navigatorKey.currentContext!).getVariableText(
|
||||||
.getVariableText(ptText: 'Aguardando Retirada', enText: 'Waiting for Pickup'),
|
ptText: 'Aguardando Retirada', enText: 'Waiting for Pickup'),
|
||||||
'value': 'notPickedUp'
|
'value': 'notPickedUp'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': FFLocalizations.of(navigatorKey.currentContext!).getVariableText(ptText: 'Retirado', enText: 'Picked Up'),
|
'title': FFLocalizations.of(navigatorKey.currentContext!)
|
||||||
|
.getVariableText(ptText: 'Retirado', enText: 'Picked Up'),
|
||||||
'value': 'pickedUp'
|
'value': 'pickedUp'
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -61,8 +64,12 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
_model = createModel(context, () => OrderFilterModalModel());
|
_model = createModel(context, () => OrderFilterModalModel());
|
||||||
|
|
||||||
selected = {
|
selected = {
|
||||||
'adresseeType': widget.defaultAdresseeType == '.*' ? ['MOR', 'PRO'] : [widget.defaultAdresseeType],
|
'adresseeType': widget.defaultAdresseeType == '.*'
|
||||||
'status': widget.defaultStatus == '.*' ? ['notPickedUp', 'pickedUp'] : [widget.defaultStatus],
|
? ['MOR', 'PRO']
|
||||||
|
: [widget.defaultAdresseeType],
|
||||||
|
'status': widget.defaultStatus == '.*'
|
||||||
|
? ['notPickedUp', 'pickedUp']
|
||||||
|
: [widget.defaultStatus],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +99,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
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) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
|
@ -108,7 +116,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
fontSize: fontsize,
|
fontSize: fontsize,
|
||||||
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,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -128,7 +137,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontSize: fontsize,
|
fontSize: fontsize,
|
||||||
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,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -156,7 +166,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
width: 5,
|
width: 5,
|
||||||
color: FlutterFlowTheme.of(context).secondaryText,
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
),
|
),
|
||||||
controlAffinity: ListTileControlAffinity.leading, // Adiciona esta linha
|
controlAffinity:
|
||||||
|
ListTileControlAffinity.leading, // Adiciona esta linha
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -186,18 +197,23 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 10.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
10.0, 10.0, 0.0, 10.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText('yfj9pd6k'), // Filtros
|
FFLocalizations.of(context)
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
.getText('yfj9pd6k'), // Filtros
|
||||||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
style:
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontSize: 18.0,
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
letterSpacing: 0.0,
|
.headlineMediumFamily,
|
||||||
fontWeight: FontWeight.bold,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
useGoogleFonts:
|
fontSize: 18.0,
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineMediumFamily),
|
letterSpacing: 0.0,
|
||||||
),
|
fontWeight: FontWeight.bold,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.headlineMediumFamily),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -209,8 +225,10 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
_buildCheckboxListTile('adresseeType', adresseeTypeOptions, limitedBodyFontSize),
|
_buildCheckboxListTile('adresseeType',
|
||||||
_buildCheckboxListTile('status', statusOptions, limitedBodyFontSize),
|
adresseeTypeOptions, limitedBodyFontSize),
|
||||||
|
_buildCheckboxListTile(
|
||||||
|
'status', statusOptions, limitedBodyFontSize),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -231,4 +249,4 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,8 @@ export 'throw_exception_model.dart';
|
||||||
|
|
||||||
// ignore: must_be_immutable
|
// ignore: must_be_immutable
|
||||||
class ThrowExceptionWidget extends StatefulWidget {
|
class ThrowExceptionWidget extends StatefulWidget {
|
||||||
ThrowExceptionWidget({super.key, required this.msg, this.type = EnumThrowException.error});
|
ThrowExceptionWidget(
|
||||||
|
{super.key, required this.msg, this.type = EnumThrowException.error});
|
||||||
|
|
||||||
final String? msg;
|
final String? msg;
|
||||||
EnumThrowException type;
|
EnumThrowException type;
|
||||||
|
@ -23,7 +24,8 @@ class ThrowExceptionWidget extends StatefulWidget {
|
||||||
State<ThrowExceptionWidget> createState() => _ThrowExceptionWidgetState();
|
State<ThrowExceptionWidget> createState() => _ThrowExceptionWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with TickerProviderStateMixin {
|
class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
||||||
|
with TickerProviderStateMixin {
|
||||||
late ThrowExceptionModel _model;
|
late ThrowExceptionModel _model;
|
||||||
final animationsMap = <String, AnimationInfo>{};
|
final animationsMap = <String, AnimationInfo>{};
|
||||||
|
|
||||||
|
@ -52,11 +54,14 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
|
||||||
String _getTitleByType(BuildContext context) {
|
String _getTitleByType(BuildContext context) {
|
||||||
switch (widget.type) {
|
switch (widget.type) {
|
||||||
case EnumThrowException.error:
|
case EnumThrowException.error:
|
||||||
return FFLocalizations.of(context).getVariableText(ptText: "Falha :(", enText: "Fail :(");
|
return FFLocalizations.of(context)
|
||||||
|
.getVariableText(ptText: "Falha :(", enText: "Fail :(");
|
||||||
case EnumThrowException.warning:
|
case EnumThrowException.warning:
|
||||||
return FFLocalizations.of(context).getVariableText(ptText: "Aviso :O", enText: "Warning :O");
|
return FFLocalizations.of(context)
|
||||||
|
.getVariableText(ptText: "Aviso :O", enText: "Warning :O");
|
||||||
case EnumThrowException.success:
|
case EnumThrowException.success:
|
||||||
return FFLocalizations.of(context).getVariableText(ptText: "Sucesso ;)", enText: "Success ;)");
|
return FFLocalizations.of(context)
|
||||||
|
.getVariableText(ptText: "Sucesso ;)", enText: "Success ;)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +101,8 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
double limitedHeaderFontSize =
|
||||||
|
LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
return InkWell(
|
return InkWell(
|
||||||
key: const ValueKey('ThrowExceptionWidget'),
|
key: const ValueKey('ThrowExceptionWidget'),
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
|
@ -109,7 +115,8 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
|
||||||
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(
|
||||||
|
@ -137,25 +144,28 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
|
||||||
Text(
|
Text(
|
||||||
_getTitleByType(context),
|
_getTitleByType(context),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
fontSize: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(15.0, 10.0, 15.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
15.0, 10.0, 15.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
valueOrDefault<String>(widget.msg, 'Message Not Found'),
|
valueOrDefault<String>(widget.msg, 'Message Not Found'),
|
||||||
overflow: TextOverflow.clip,
|
overflow: TextOverflow.clip,
|
||||||
textAlign: TextAlign.center,
|
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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedBodyFontSize,
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -3,7 +3,8 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class VisitorNotFoundComponentModel extends FlutterFlowModel<VisitorNotFoundComponentWidget> {
|
class VisitorNotFoundComponentModel
|
||||||
|
extends FlutterFlowModel<VisitorNotFoundComponentWidget> {
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,12 @@ class VisitorNotFoundComponentWidget extends StatefulWidget {
|
||||||
|
|
||||||
final String? doc;
|
final String? doc;
|
||||||
@override
|
@override
|
||||||
State<VisitorNotFoundComponentWidget> createState() => _VisitorNotFoundComponentWidgetState();
|
State<VisitorNotFoundComponentWidget> createState() =>
|
||||||
|
_VisitorNotFoundComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _VisitorNotFoundComponentWidgetState extends State<VisitorNotFoundComponentWidget> {
|
class _VisitorNotFoundComponentWidgetState
|
||||||
|
extends State<VisitorNotFoundComponentWidget> {
|
||||||
late VisitorNotFoundComponentModel _model;
|
late VisitorNotFoundComponentModel _model;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -59,7 +61,8 @@ class _VisitorNotFoundComponentWidgetState extends State<VisitorNotFoundComponen
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 5.0, 5.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(0.0, 5.0, 5.0, 0.0),
|
||||||
child: FlutterFlowIconButton(
|
child: FlutterFlowIconButton(
|
||||||
borderRadius: 20.0,
|
borderRadius: 20.0,
|
||||||
borderWidth: 1.0,
|
borderWidth: 1.0,
|
||||||
|
@ -81,16 +84,19 @@ class _VisitorNotFoundComponentWidgetState extends State<VisitorNotFoundComponen
|
||||||
size: 72.0,
|
size: 72.0,
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(5.0, 16.0, 5.0, 10.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(5.0, 16.0, 5.0, 10.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'1p9mykbj' /* Usuário não encontrado */,
|
'1p9mykbj' /* Usuário não encontrado */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: FlutterFlowTheme.of(context).headlineSmall.override(
|
style: FlutterFlowTheme.of(context).headlineSmall.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).headlineSmallFamily,
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).headlineSmallFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineSmallFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).headlineSmallFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -107,7 +113,8 @@ class _VisitorNotFoundComponentWidgetState extends State<VisitorNotFoundComponen
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontStyle: FontStyle.italic,
|
fontStyle: FontStyle.italic,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelSmallFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelSmallFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -140,18 +147,22 @@ class _VisitorNotFoundComponentWidgetState extends State<VisitorNotFoundComponen
|
||||||
).then((value) => context.pop(value));
|
).then((value) => context.pop(value));
|
||||||
// Navigator.pop(context, value)
|
// Navigator.pop(context, value)
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context).getVariableText(enText: 'Add', ptText: 'Adicionar'),
|
text: FFLocalizations.of(context)
|
||||||
|
.getVariableText(enText: 'Add', ptText: 'Adicionar'),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
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).labelSmall.override(
|
textStyle: FlutterFlowTheme.of(context).labelSmall.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelSmallFamily,
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelSmallFamily,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelSmallFamily),
|
FlutterFlowTheme.of(context).labelSmallFamily),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
|
|
|
@ -3,7 +3,8 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class BottomArrowLinkedLocalsComponentModel extends FlutterFlowModel<BottomArrowLinkedLocalsComponentWidget> {
|
class BottomArrowLinkedLocalsComponentModel
|
||||||
|
extends FlutterFlowModel<BottomArrowLinkedLocalsComponentWidget> {
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,12 @@ class BottomArrowLinkedLocalsComponentWidget extends StatefulWidget {
|
||||||
ApiCallResponse? response;
|
ApiCallResponse? response;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<BottomArrowLinkedLocalsComponentWidget> createState() => _BottomArrowLinkedLocalsComponentWidgetState();
|
State<BottomArrowLinkedLocalsComponentWidget> createState() =>
|
||||||
|
_BottomArrowLinkedLocalsComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLinkedLocalsComponentWidget> {
|
class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
|
extends State<BottomArrowLinkedLocalsComponentWidget> {
|
||||||
late BottomArrowLinkedLocalsComponentModel _model;
|
late BottomArrowLinkedLocalsComponentModel _model;
|
||||||
|
|
||||||
bool _loading = false;
|
bool _loading = false;
|
||||||
|
@ -38,7 +40,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(context, () => BottomArrowLinkedLocalsComponentModel());
|
_model =
|
||||||
|
createModel(context, () => BottomArrowLinkedLocalsComponentModel());
|
||||||
_localsFuture = _fetchLocals();
|
_localsFuture = _fetchLocals();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,10 +107,14 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
if (isEnabled) {
|
if (isEnabled) {
|
||||||
final local = locals[0];
|
final local = locals[0];
|
||||||
|
|
||||||
await StorageHelper().set(ProfileStorageKey.clientName.key, local['CLI_NOME']);
|
await StorageHelper()
|
||||||
await StorageHelper().set(ProfileStorageKey.ownerName.key, local['CLU_OWNER_DSC']);
|
.set(ProfileStorageKey.clientName.key, local['CLI_NOME']);
|
||||||
await StorageHelper().set(ProfileStorageKey.clientUUID.key, local['CLI_ID']);
|
await StorageHelper()
|
||||||
await StorageHelper().set(ProfileStorageKey.ownerUUID.key, local['CLU_OWNER_ID']);
|
.set(ProfileStorageKey.ownerName.key, local['CLU_OWNER_DSC']);
|
||||||
|
await StorageHelper()
|
||||||
|
.set(ProfileStorageKey.clientUUID.key, local['CLI_ID']);
|
||||||
|
await StorageHelper()
|
||||||
|
.set(ProfileStorageKey.ownerUUID.key, local['CLU_OWNER_ID']);
|
||||||
|
|
||||||
context.pop();
|
context.pop();
|
||||||
return widget.response;
|
return widget.response;
|
||||||
|
@ -131,7 +138,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> _handleError(BuildContext context, String errorMsg) async {
|
static Future<void> _handleError(
|
||||||
|
BuildContext context, String errorMsg) async {
|
||||||
await DialogUtil.error(context, errorMsg);
|
await DialogUtil.error(context, errorMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,18 +149,25 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
var response = await PhpGroup.resopndeVinculo.call(tarefa: status);
|
var response = await PhpGroup.resopndeVinculo.call(tarefa: status);
|
||||||
|
|
||||||
if (response.jsonBody['error'] == false) {
|
if (response.jsonBody['error'] == false) {
|
||||||
return {'error': false, 'error_msg': FFLocalizations.of(context).getVariableText(ptText: "Vínculo Ativado com Sucesso", enText: "Link Activated Successfully")};
|
return {
|
||||||
|
'error': false,
|
||||||
|
'error_msg': FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: "Vínculo Ativado com Sucesso",
|
||||||
|
enText: "Link Activated Successfully")
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
await StorageHelper().set(ProfileStorageKey.clientUUID.key, '');
|
await StorageHelper().set(ProfileStorageKey.clientUUID.key, '');
|
||||||
return response.jsonBody;
|
return response.jsonBody;
|
||||||
}
|
}
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
await DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('responderVinculo.php', '', 'Responder Vínculo', e, s);
|
LogUtil.requestAPIFailed(
|
||||||
|
'responderVinculo.php', '', 'Responder Vínculo', e, s);
|
||||||
return {
|
return {
|
||||||
'error': true,
|
'error': true,
|
||||||
'error_msg': FFLocalizations.of(context)
|
'error_msg': FFLocalizations.of(context).getVariableText(
|
||||||
.getVariableText(ptText: "Falha ao efetuar operação, Tente Novamente mais tarde.", enText: "Failed to perform operation, please try again later.")
|
ptText: "Falha ao efetuar operação, Tente Novamente mais tarde.",
|
||||||
|
enText: "Failed to perform operation, please try again later.")
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -162,18 +177,27 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, String> _labelsHashMap(dynamic local) {
|
Map<String, String> _labelsHashMap(dynamic local) {
|
||||||
return Map<String, String>.from(
|
return Map<String, String>.from({
|
||||||
{'${local['CLI_PREFIXO']}:': local['CLI_NOME'], '${FFLocalizations.of(context).getVariableText(ptText: 'Propriedade', enText: 'Property')}:': local['CLU_OWNER_DSC']});
|
'${local['CLI_PREFIXO']}:': local['CLI_NOME'],
|
||||||
|
'${FFLocalizations.of(context).getVariableText(ptText: 'Propriedade', enText: 'Property')}:':
|
||||||
|
local['CLU_OWNER_DSC']
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Color> _statusHashMap(dynamic local) {
|
Map<String, Color> _statusHashMap(dynamic local) {
|
||||||
return Map<String, Color>.from({
|
return Map<String, Color>.from({
|
||||||
if (local['CLU_STATUS'] == 'A')
|
if (local['CLU_STATUS'] == 'A')
|
||||||
FFLocalizations.of(context).getVariableText(ptText: 'Ativo', enText: 'Active'): FlutterFlowTheme.of(context).success
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Ativo',
|
||||||
|
enText: 'Active'): FlutterFlowTheme.of(context).success
|
||||||
else if (local['CLU_STATUS'] == 'B')
|
else if (local['CLU_STATUS'] == 'B')
|
||||||
FFLocalizations.of(context).getVariableText(ptText: 'Bloqueado', enText: 'Blocked'): FlutterFlowTheme.of(context).error
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Bloqueado',
|
||||||
|
enText: 'Blocked'): FlutterFlowTheme.of(context).error
|
||||||
else
|
else
|
||||||
FFLocalizations.of(context).getVariableText(ptText: 'Pendente', enText: 'Pending'): FlutterFlowTheme.of(context).warning
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Pendente',
|
||||||
|
enText: 'Pending'): FlutterFlowTheme.of(context).warning
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,16 +208,21 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
statusHashMap: [_statusHashMap(local)],
|
statusHashMap: [_statusHashMap(local)],
|
||||||
onTapCardItemAction: () async {
|
onTapCardItemAction: () async {
|
||||||
if (local['CLU_STATUS'] == 'A') {
|
if (local['CLU_STATUS'] == 'A') {
|
||||||
await StorageHelper().set(ProfileStorageKey.clientUUID.key, local['CLI_ID']);
|
await StorageHelper()
|
||||||
await StorageHelper().set(ProfileStorageKey.clientName.key, local['CLI_NOME']);
|
.set(ProfileStorageKey.clientUUID.key, local['CLI_ID']);
|
||||||
await StorageHelper().set(ProfileStorageKey.ownerName.key, local['CLU_OWNER_DSC']);
|
await StorageHelper()
|
||||||
await StorageHelper().set(ProfileStorageKey.ownerUUID.key, local['CLU_OWNER_ID']);
|
.set(ProfileStorageKey.clientName.key, local['CLI_NOME']);
|
||||||
|
await StorageHelper()
|
||||||
|
.set(ProfileStorageKey.ownerName.key, local['CLU_OWNER_DSC']);
|
||||||
|
await StorageHelper()
|
||||||
|
.set(ProfileStorageKey.ownerUUID.key, local['CLU_OWNER_ID']);
|
||||||
|
|
||||||
context.pop(true);
|
context.pop(true);
|
||||||
return true;
|
return true;
|
||||||
} else if (local['CLU_STATUS'] == 'B') {
|
} else if (local['CLU_STATUS'] == 'B') {
|
||||||
String message = FFLocalizations.of(context).getVariableText(
|
String message = FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Local Bloqueado para Acesso, Entre em Contato com Administração',
|
ptText:
|
||||||
|
'Local Bloqueado para Acesso, Entre em Contato com Administração',
|
||||||
enText: 'Location Blocked for Access, Contact Administration',
|
enText: 'Location Blocked for Access, Contact Administration',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -209,8 +238,11 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
String localName = local['CLI_NOME'];
|
String localName = local['CLI_NOME'];
|
||||||
showAlertDialog(
|
showAlertDialog(
|
||||||
context,
|
context,
|
||||||
FFLocalizations.of(context).getVariableText(ptText: 'Ativar Vínculo', enText: 'Activate Link'),
|
FFLocalizations.of(context).getVariableText(
|
||||||
FFLocalizations.of(context).getVariableText(ptText: 'Deseja aceitar o vínculo a $localName?', enText: 'Do you wish to accept the link to $localName?'),
|
ptText: 'Ativar Vínculo', enText: 'Activate Link'),
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Deseja aceitar o vínculo a $localName?',
|
||||||
|
enText: 'Do you wish to accept the link to $localName?'),
|
||||||
() async {
|
() async {
|
||||||
var response = await _fetchResponseLink('A', local['CLI_ID']);
|
var response = await _fetchResponseLink('A', local['CLI_ID']);
|
||||||
context.pop();
|
context.pop();
|
||||||
|
@ -263,7 +295,9 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: height - (height * 0.5),
|
height: height - (height * 0.5),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground, borderRadius: const BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25))),
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
borderRadius: const BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(25), topRight: Radius.circular(25))),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
@ -275,12 +309,16 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: Text(FFLocalizations.of(context).getVariableText(ptText: "Nenhum Local Encontrado.", enText: "No local found")),
|
child: Text(FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: "Nenhum Local Encontrado.",
|
||||||
|
enText: "No local found")),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
else if (_hasData == true && _loading == false && _localsWrap.isNotEmpty)
|
else if (_hasData == true &&
|
||||||
|
_loading == false &&
|
||||||
|
_localsWrap.isNotEmpty)
|
||||||
Expanded(child: _listItems(context)),
|
Expanded(child: _listItems(context)),
|
||||||
if (_loading == true)
|
if (_loading == true)
|
||||||
Container(
|
Container(
|
||||||
|
@ -297,7 +335,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
padding: const EdgeInsets.only(top: 10),
|
padding: const EdgeInsets.only(top: 10),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(ptText: 'Escolha um local', enText: 'Choose a location'),
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Escolha um local', enText: 'Choose a location'),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||||
)))),
|
)))),
|
||||||
|
|
|
@ -7,7 +7,8 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
// ignore: unused_import
|
// ignore: unused_import
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
class ScheduleVisitDetailModel extends FlutterFlowModel<ScheduleVisitDetailWidget> {
|
class ScheduleVisitDetailModel
|
||||||
|
extends FlutterFlowModel<ScheduleVisitDetailWidget> {
|
||||||
late final String devUUID;
|
late final String devUUID;
|
||||||
late final String userUUID;
|
late final String userUUID;
|
||||||
late final String cliUUID;
|
late final String cliUUID;
|
||||||
|
@ -37,7 +38,8 @@ class ScheduleVisitDetailModel extends FlutterFlowModel<ScheduleVisitDetailWidge
|
||||||
DateFormat originalFormat = DateFormat('d/M/y H:mm:ss');
|
DateFormat originalFormat = DateFormat('d/M/y H:mm:ss');
|
||||||
DateFormat newFormat = DateFormat('y-M-d H:mm:ss');
|
DateFormat newFormat = DateFormat('y-M-d H:mm:ss');
|
||||||
|
|
||||||
if (!RegExp(r'^\d{1,2}/\d{1,2}/\d{4} \d{1,2}:\d{2}:\d{2}$').hasMatch(dateStr)) {
|
if (!RegExp(r'^\d{1,2}/\d{1,2}/\d{4} \d{1,2}:\d{2}:\d{2}$')
|
||||||
|
.hasMatch(dateStr)) {
|
||||||
return 'Invalid date format';
|
return 'Invalid date format';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,8 +59,10 @@ class ScheduleVisitDetailModel extends FlutterFlowModel<ScheduleVisitDetailWidge
|
||||||
|
|
||||||
Future<void> initDB() async {
|
Future<void> initDB() async {
|
||||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
userUUID =
|
||||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -35,7 +35,8 @@ class ScheduleVisitDetailWidget extends StatefulWidget {
|
||||||
final String? visitObsStr;
|
final String? visitObsStr;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<ScheduleVisitDetailWidget> createState() => _ScheduleVisitDetailWidgetState();
|
State<ScheduleVisitDetailWidget> createState() =>
|
||||||
|
_ScheduleVisitDetailWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
|
@ -57,16 +58,19 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
_model.textController1 ??= TextEditingController(text: widget.visitTempStr);
|
_model.textController1 ??= TextEditingController(text: widget.visitTempStr);
|
||||||
_model.textFieldFocusNode1 ??= FocusNode();
|
_model.textFieldFocusNode1 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController2 ??= TextEditingController(text: widget.visitStartDate);
|
_model.textController2 ??=
|
||||||
|
TextEditingController(text: widget.visitStartDate);
|
||||||
_model.textFieldFocusNode2 ??= FocusNode();
|
_model.textFieldFocusNode2 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController3 ??= TextEditingController(text: widget.visitEndDate);
|
_model.textController3 ??= TextEditingController(text: widget.visitEndDate);
|
||||||
_model.textFieldFocusNode3 ??= FocusNode();
|
_model.textFieldFocusNode3 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController4 ??= TextEditingController(text: extractDescToStr(widget.visitResonStr!));
|
_model.textController4 ??=
|
||||||
|
TextEditingController(text: extractDescToStr(widget.visitResonStr!));
|
||||||
_model.textFieldFocusNode4 ??= FocusNode();
|
_model.textFieldFocusNode4 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController5 ??= TextEditingController(text: extractDescToStr(widget.visitLevelStr!));
|
_model.textController5 ??=
|
||||||
|
TextEditingController(text: extractDescToStr(widget.visitLevelStr!));
|
||||||
_model.textFieldFocusNode5 ??= FocusNode();
|
_model.textFieldFocusNode5 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController6 ??= TextEditingController(text: widget.visitObsStr);
|
_model.textController6 ??= TextEditingController(text: widget.visitObsStr);
|
||||||
|
@ -128,11 +132,13 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Visibility(
|
child: Visibility(
|
||||||
visible: widget.visitorStrList != null && widget.visitorStrList != '',
|
visible: widget.visitorStrList != null &&
|
||||||
|
widget.visitorStrList != '',
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(15.0, 0.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
15.0, 0.0, 0.0, 0.0),
|
||||||
child: FlutterFlowIconButton(
|
child: FlutterFlowIconButton(
|
||||||
borderRadius: 20.0,
|
borderRadius: 20.0,
|
||||||
borderWidth: 1.0,
|
borderWidth: 1.0,
|
||||||
|
@ -155,7 +161,8 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(5.0, 0.0, 5.0, 20.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
5.0, 0.0, 5.0, 20.0),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
|
@ -183,7 +190,8 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
Container(
|
Container(
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 10.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 8.0, 10.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController1,
|
controller: _model.textController1,
|
||||||
focusNode: _model.textFieldFocusNode1,
|
focusNode: _model.textFieldFocusNode1,
|
||||||
|
@ -195,17 +203,31 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'7w4fohoa' /* Encerramento da Visita */,
|
'7w4fohoa' /* Encerramento da Visita */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -236,24 +258,32 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
validator: _model.textController1Validator.asValidator(context),
|
validator: _model.textController1Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 0.0, 0.0, 10.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 8.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController2,
|
controller: _model.textController2,
|
||||||
focusNode: _model.textFieldFocusNode2,
|
focusNode: _model.textFieldFocusNode2,
|
||||||
|
@ -262,68 +292,98 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getVariableText(
|
labelText: FFLocalizations.of(context)
|
||||||
|
.getVariableText(
|
||||||
enText: 'Start',
|
enText: 'Start',
|
||||||
ptText: 'Início',
|
ptText: 'Início',
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText:
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
'0cp1e31d' /* dd/mm/yyyy */,
|
'0cp1e31d' /* dd/mm/yyyy */,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.accent1,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primary,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color:
|
||||||
|
FlutterFlowTheme.of(context).error,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color:
|
||||||
|
FlutterFlowTheme.of(context).error,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
validator: _model.textController2Validator.asValidator(context),
|
validator: _model.textController2Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 8.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController3,
|
controller: _model.textController3,
|
||||||
focusNode: _model.textFieldFocusNode3,
|
focusNode: _model.textFieldFocusNode3,
|
||||||
|
@ -332,61 +392,90 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText:
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
'abppdgz3' /* Término */,
|
'abppdgz3' /* Término */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText:
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
'kqralft4' /* dd/mm/yyyy */,
|
'kqralft4' /* dd/mm/yyyy */,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.accent1,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primary,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color:
|
||||||
|
FlutterFlowTheme.of(context).error,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color:
|
||||||
|
FlutterFlowTheme.of(context).error,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
validator: _model.textController3Validator.asValidator(context),
|
validator: _model.textController3Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -394,14 +483,16 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 0.0, 0.0, 10.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 8.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController4,
|
controller: _model.textController4,
|
||||||
focusNode: _model.textFieldFocusNode4,
|
focusNode: _model.textFieldFocusNode4,
|
||||||
|
@ -410,66 +501,96 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText:
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
'xjxhzqqm' /* Motivo da Visita */,
|
'xjxhzqqm' /* Motivo da Visita */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText:
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
'47oezdm6' /* Motivo */,
|
'47oezdm6' /* Motivo */,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.accent1,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primary,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color:
|
||||||
|
FlutterFlowTheme.of(context).error,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color:
|
||||||
|
FlutterFlowTheme.of(context).error,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
validator: _model.textController4Validator.asValidator(context),
|
validator: _model.textController4Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 8.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController5,
|
controller: _model.textController5,
|
||||||
focusNode: _model.textFieldFocusNode5,
|
focusNode: _model.textFieldFocusNode5,
|
||||||
|
@ -478,60 +599,89 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText:
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
'2ujg7u18' /* Nível de Acesso */,
|
'2ujg7u18' /* Nível de Acesso */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText:
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
'3emmbbfv' /* Nível de Acesso */,
|
'3emmbbfv' /* Nível de Acesso */,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.accent1,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primary,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color:
|
||||||
|
FlutterFlowTheme.of(context).error,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color:
|
||||||
|
FlutterFlowTheme.of(context).error,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
validator: _model.textController5Validator.asValidator(context),
|
validator: _model.textController5Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -541,7 +691,8 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
Container(
|
Container(
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 8.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController6,
|
controller: _model.textController6,
|
||||||
focusNode: _model.textFieldFocusNode6,
|
focusNode: _model.textFieldFocusNode6,
|
||||||
|
@ -553,17 +704,31 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'ritce5uw' /* Observações da Visita */,
|
'ritce5uw' /* Observações da Visita */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -594,12 +759,18 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
validator: _model.textController6Validator.asValidator(context),
|
validator: _model.textController6Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -609,10 +780,12 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
_model.postScheduleVisit = await PhpGroup.postScheduleVisitCall.call(
|
_model.postScheduleVisit =
|
||||||
|
await PhpGroup.postScheduleVisitCall.call(
|
||||||
devDesc: widget.visitObsStr,
|
devDesc: widget.visitObsStr,
|
||||||
idVisitante: widget.visitorStrList,
|
idVisitante: widget.visitorStrList,
|
||||||
dtInicio: _model.convertDateFormat(widget.visitStartDate ?? ''),
|
dtInicio:
|
||||||
|
_model.convertDateFormat(widget.visitStartDate ?? ''),
|
||||||
dtFim: _model.convertDateFormat(widget.visitEndDate ?? ''),
|
dtFim: _model.convertDateFormat(widget.visitEndDate ?? ''),
|
||||||
unica: widget.visitTempStr,
|
unica: widget.visitTempStr,
|
||||||
idMotivo: extractIdToStr(widget.visitResonStr!),
|
idMotivo: extractIdToStr(widget.visitResonStr!),
|
||||||
|
@ -629,7 +802,8 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
final String? msg = PhpGroup.postScheduleVisitCall.errorMsg(
|
final String? msg = PhpGroup.postScheduleVisitCall.errorMsg(
|
||||||
(_model.postScheduleVisit?.jsonBody ?? ''),
|
(_model.postScheduleVisit?.jsonBody ?? ''),
|
||||||
);
|
);
|
||||||
await DialogUtil.error(context, msg!).then((value) => safeSetState(() {}));
|
await DialogUtil.error(context, msg!)
|
||||||
|
.then((value) => safeSetState(() {}));
|
||||||
}
|
}
|
||||||
|
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
|
|
@ -3,7 +3,8 @@ import 'package:hub/components/organism_components/up_arrow_linked_locals_compon
|
||||||
import 'package:hub/features/storage/index.dart';
|
import 'package:hub/features/storage/index.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
|
|
||||||
class UpArrowLinkedLocalsComponentModel extends FlutterFlowModel<UpArrowLinkedLocalsComponentWidget> {
|
class UpArrowLinkedLocalsComponentModel
|
||||||
|
extends FlutterFlowModel<UpArrowLinkedLocalsComponentWidget> {
|
||||||
late final String devUUID;
|
late final String devUUID;
|
||||||
late final String userUUID;
|
late final String userUUID;
|
||||||
late final String cliUUID;
|
late final String cliUUID;
|
||||||
|
@ -16,9 +17,12 @@ class UpArrowLinkedLocalsComponentModel extends FlutterFlowModel<UpArrowLinkedLo
|
||||||
|
|
||||||
Future<void> initDB() async {
|
Future<void> initDB() async {
|
||||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
userUUID =
|
||||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? '';
|
cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
|
cliName =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -12,10 +12,12 @@ class UpArrowLinkedLocalsComponentWidget extends StatefulWidget {
|
||||||
const UpArrowLinkedLocalsComponentWidget({super.key});
|
const UpArrowLinkedLocalsComponentWidget({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<UpArrowLinkedLocalsComponentWidget> createState() => _UpArrowLinkedLocalsComponentWidgetState();
|
State<UpArrowLinkedLocalsComponentWidget> createState() =>
|
||||||
|
_UpArrowLinkedLocalsComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _UpArrowLinkedLocalsComponentWidgetState extends State<UpArrowLinkedLocalsComponentWidget> {
|
class _UpArrowLinkedLocalsComponentWidgetState
|
||||||
|
extends State<UpArrowLinkedLocalsComponentWidget> {
|
||||||
late UpArrowLinkedLocalsComponentModel _model;
|
late UpArrowLinkedLocalsComponentModel _model;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -105,7 +107,8 @@ class _UpArrowLinkedLocalsComponentWidgetState extends State<UpArrowLinkedLocals
|
||||||
|
|
||||||
return GridView.builder(
|
return GridView.builder(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate:
|
||||||
|
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 1,
|
crossAxisCount: 1,
|
||||||
crossAxisSpacing: 10.0,
|
crossAxisSpacing: 10.0,
|
||||||
mainAxisSpacing: 0.0,
|
mainAxisSpacing: 0.0,
|
||||||
|
@ -114,7 +117,8 @@ class _UpArrowLinkedLocalsComponentWidgetState extends State<UpArrowLinkedLocals
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
itemCount: eachLocals.length,
|
itemCount: eachLocals.length,
|
||||||
itemBuilder: (context, eachLocalsIndex) {
|
itemBuilder: (context, eachLocalsIndex) {
|
||||||
final eachLocalsItem = eachLocals[eachLocalsIndex];
|
final eachLocalsItem =
|
||||||
|
eachLocals[eachLocalsIndex];
|
||||||
return InkWell(
|
return InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -137,58 +141,82 @@ class _UpArrowLinkedLocalsComponentWidgetState extends State<UpArrowLinkedLocals
|
||||||
width: 50.0,
|
width: 50.0,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
height: 100.0,
|
height: 100.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context)
|
||||||
borderRadius: const BorderRadius.only(
|
.primaryText,
|
||||||
|
borderRadius:
|
||||||
|
const BorderRadius.only(
|
||||||
bottomLeft: Radius.circular(25.0),
|
bottomLeft: Radius.circular(25.0),
|
||||||
bottomRight: Radius.circular(25.0),
|
bottomRight:
|
||||||
|
Radius.circular(25.0),
|
||||||
topLeft: Radius.circular(25.0),
|
topLeft: Radius.circular(25.0),
|
||||||
topRight: Radius.circular(25.0),
|
topRight: Radius.circular(25.0),
|
||||||
),
|
),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: FlutterFlowTheme.of(context).secondaryText,
|
color:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.secondaryText,
|
||||||
width: 3.0,
|
width: 3.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius:
|
||||||
|
const BorderRadius.only(
|
||||||
bottomLeft: Radius.circular(25.0),
|
bottomLeft: Radius.circular(25.0),
|
||||||
bottomRight: Radius.circular(25.0),
|
bottomRight:
|
||||||
|
Radius.circular(25.0),
|
||||||
topLeft: Radius.circular(25.0),
|
topLeft: Radius.circular(25.0),
|
||||||
topRight: Radius.circular(25.0),
|
topRight: Radius.circular(25.0),
|
||||||
),
|
),
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
imageUrl: "https://freaccess.com.br/freaccess/Images/Clients/${getJsonField(
|
imageUrl:
|
||||||
|
"https://freaccess.com.br/freaccess/Images/Clients/${getJsonField(
|
||||||
eachLocalsItem,
|
eachLocalsItem,
|
||||||
r'''$.CLI_ID''',
|
r'''$.CLI_ID''',
|
||||||
).toString()}.png",
|
).toString()}.png",
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
alignment: const Alignment(0.0, 0.0),
|
alignment:
|
||||||
|
const Alignment(0.0, 0.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
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: Text(
|
child: Text(
|
||||||
getJsonField(
|
getJsonField(
|
||||||
eachLocalsItem,
|
eachLocalsItem,
|
||||||
r'''$.CLI_NOME''',
|
r'''$.CLI_NOME''',
|
||||||
).toString(),
|
).toString(),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -4,9 +4,11 @@ import 'package:hub/features/storage/index.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
|
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'access_notification_modal_template_component_widget.dart' show AccessNotificationModalTemplateComponentWidget;
|
import 'access_notification_modal_template_component_widget.dart'
|
||||||
|
show AccessNotificationModalTemplateComponentWidget;
|
||||||
|
|
||||||
class AccessNotificationModalTemplateComponentModel extends FlutterFlowModel<AccessNotificationModalTemplateComponentWidget> {
|
class AccessNotificationModalTemplateComponentModel
|
||||||
|
extends FlutterFlowModel<AccessNotificationModalTemplateComponentWidget> {
|
||||||
late final String devUUID;
|
late final String devUUID;
|
||||||
late final String userUUID;
|
late final String userUUID;
|
||||||
late final String cliUUID;
|
late final String cliUUID;
|
||||||
|
@ -31,8 +33,10 @@ class AccessNotificationModalTemplateComponentModel extends FlutterFlowModel<Acc
|
||||||
|
|
||||||
Future<void> initDB() async {
|
Future<void> initDB() async {
|
||||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
userUUID =
|
||||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -41,7 +41,8 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
_model = createModel(context, () => AccessNotificationModalTemplateComponentModel());
|
_model = createModel(
|
||||||
|
context, () => AccessNotificationModalTemplateComponentModel());
|
||||||
|
|
||||||
_model.textController1 ??= TextEditingController(text: widget.name);
|
_model.textController1 ??= TextEditingController(text: widget.name);
|
||||||
_model.textFieldFocusNode1 ??= FocusNode();
|
_model.textFieldFocusNode1 ??= FocusNode();
|
||||||
|
@ -65,9 +66,11 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
String labelTypeResident = FFLocalizations.of(context).getVariableText(enText: 'Resident', ptText: 'Morador');
|
String labelTypeResident = FFLocalizations.of(context)
|
||||||
|
.getVariableText(enText: 'Resident', ptText: 'Morador');
|
||||||
|
|
||||||
String labelTypeVisitor = FFLocalizations.of(context).getVariableText(enText: 'Visitor', ptText: 'Visitante');
|
String labelTypeVisitor = FFLocalizations.of(context)
|
||||||
|
.getVariableText(enText: 'Visitor', ptText: 'Visitante');
|
||||||
|
|
||||||
return Align(
|
return Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
|
@ -110,10 +113,13 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].addToStart(const SizedBox(width: 10.0)).addToEnd(const SizedBox(width: 10.0)),
|
]
|
||||||
|
.addToStart(const SizedBox(width: 10.0))
|
||||||
|
.addToEnd(const SizedBox(width: 10.0)),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController1,
|
controller: _model.textController1,
|
||||||
focusNode: _model.textFieldFocusNode1,
|
focusNode: _model.textFieldFocusNode1,
|
||||||
|
@ -126,19 +132,25 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'dvag09pq' /* Nome */,
|
'dvag09pq' /* Nome */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -150,16 +162,18 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
validator: _model.textController1Validator.asValidator(context),
|
validator:
|
||||||
|
_model.textController1Validator.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
|
@ -167,8 +181,10 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller:
|
controller: TextEditingController(
|
||||||
TextEditingController(text: widget.type == 'O' ? labelTypeResident : labelTypeVisitor),
|
text: widget.type == 'O'
|
||||||
|
? labelTypeResident
|
||||||
|
: labelTypeVisitor),
|
||||||
focusNode: _model.textFieldFocusNode2,
|
focusNode: _model.textFieldFocusNode2,
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
textInputAction: TextInputAction.next,
|
textInputAction: TextInputAction.next,
|
||||||
|
@ -179,19 +195,27 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'h3s0r1he' /* Tipo */,
|
'h3s0r1he' /* Tipo */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -203,22 +227,28 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
validator: _model.textController2Validator.asValidator(context),
|
validator: _model.textController2Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].addToStart(const SizedBox(width: 24.0)).addToEnd(const SizedBox(width: 24.0)),
|
]
|
||||||
|
.addToStart(const SizedBox(width: 24.0))
|
||||||
|
.addToEnd(const SizedBox(width: 24.0)),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController3,
|
controller: _model.textController3,
|
||||||
focusNode: _model.textFieldFocusNode3,
|
focusNode: _model.textFieldFocusNode3,
|
||||||
|
@ -231,19 +261,25 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'jveeqpdz' /* Acesso */,
|
'jveeqpdz' /* Acesso */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -255,20 +291,23 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
validator: _model.textController3Validator.asValidator(context),
|
validator:
|
||||||
|
_model.textController3Validator.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController4,
|
controller: _model.textController4,
|
||||||
focusNode: _model.textFieldFocusNode4,
|
focusNode: _model.textFieldFocusNode4,
|
||||||
|
@ -283,18 +322,24 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
enText: 'Access Sector',
|
enText: 'Access Sector',
|
||||||
ptText: 'Setor de Acesso',
|
ptText: 'Setor de Acesso',
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -306,14 +351,16 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
validator: _model.textController4Validator.asValidator(context),
|
validator:
|
||||||
|
_model.textController4Validator.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'card_item_template_component_widget.dart' show CardItemTemplateComponentWidget;
|
import 'card_item_template_component_widget.dart'
|
||||||
|
show CardItemTemplateComponentWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class CardItemTemplateComponentModel extends FlutterFlowModel<CardItemTemplateComponentWidget> {
|
class CardItemTemplateComponentModel
|
||||||
|
extends FlutterFlowModel<CardItemTemplateComponentWidget> {
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,12 @@ class CardItemTemplateComponentWidget extends StatefulWidget {
|
||||||
final Future Function()? onTapCardItemAction;
|
final Future Function()? onTapCardItemAction;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<CardItemTemplateComponentWidget> createState() => _CardItemTemplateComponentWidgetState();
|
State<CardItemTemplateComponentWidget> createState() =>
|
||||||
|
_CardItemTemplateComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateComponentWidget> {
|
class _CardItemTemplateComponentWidgetState
|
||||||
|
extends State<CardItemTemplateComponentWidget> {
|
||||||
late CardItemTemplateComponentModel _model;
|
late CardItemTemplateComponentModel _model;
|
||||||
late LinkedHashMap<String, String> labelsLinkedHashMap;
|
late LinkedHashMap<String, String> labelsLinkedHashMap;
|
||||||
late List<LinkedHashMap<String, Color>> statusLinkedHashMap;
|
late List<LinkedHashMap<String, Color>> statusLinkedHashMap;
|
||||||
|
@ -40,7 +42,9 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(context, () => CardItemTemplateComponentModel());
|
_model = createModel(context, () => CardItemTemplateComponentModel());
|
||||||
labelsLinkedHashMap = LinkedHashMap.from(widget.labelsHashMap ?? {});
|
labelsLinkedHashMap = LinkedHashMap.from(widget.labelsHashMap ?? {});
|
||||||
statusLinkedHashMap = widget.statusHashMap.map((map) => LinkedHashMap<String, Color>.from(map ?? {})).toList();
|
statusLinkedHashMap = widget.statusHashMap
|
||||||
|
.map((map) => LinkedHashMap<String, Color>.from(map ?? {}))
|
||||||
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -70,7 +74,8 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
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),
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: limitedBodyTextSize,
|
fontSize: limitedBodyTextSize,
|
||||||
),
|
),
|
||||||
|
@ -85,7 +90,8 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
||||||
fontSize: limitedBodyTextSize,
|
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),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -171,11 +177,16 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
||||||
runSpacing: 4,
|
runSpacing: 4,
|
||||||
children: _generateStatus(),
|
children: _generateStatus(),
|
||||||
),
|
),
|
||||||
].addToEnd(const SizedBox(height: 5)).divide(const SizedBox(height: 1)).addToStart(const SizedBox(height: 5)),
|
]
|
||||||
|
.addToEnd(const SizedBox(height: 5))
|
||||||
|
.divide(const SizedBox(height: 1))
|
||||||
|
.addToStart(const SizedBox(height: 5)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (widget.imagePath != null) _generateImage(),
|
if (widget.imagePath != null) _generateImage(),
|
||||||
].addToEnd(const SizedBox(width: 10)).addToStart(const SizedBox(width: 10)),
|
]
|
||||||
|
.addToEnd(const SizedBox(width: 10))
|
||||||
|
.addToStart(const SizedBox(width: 10)),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Column(
|
return Column(
|
||||||
|
|
|
@ -2,7 +2,8 @@ import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'change_pass_widget.dart' show PassKeyTemplateWidget;
|
import 'change_pass_widget.dart' show PassKeyTemplateWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class PassKeyTemplateComponentModel extends FlutterFlowModel<PassKeyTemplateWidget> {
|
class PassKeyTemplateComponentModel
|
||||||
|
extends FlutterFlowModel<PassKeyTemplateWidget> {
|
||||||
/// State fields for stateful widgets in this component.
|
/// State fields for stateful widgets in this component.
|
||||||
|
|
||||||
final formKey = GlobalKey<FormState>();
|
final formKey = GlobalKey<FormState>();
|
||||||
|
@ -15,7 +16,8 @@ class PassKeyTemplateComponentModel extends FlutterFlowModel<PassKeyTemplateWidg
|
||||||
late bool keyTextFieldVisibility2;
|
late bool keyTextFieldVisibility2;
|
||||||
String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator1;
|
String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator1;
|
||||||
String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator2;
|
String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator2;
|
||||||
String? _keyTextFieldTextControllerValidator(BuildContext context, String? val) {
|
String? _keyTextFieldTextControllerValidator(
|
||||||
|
BuildContext context, String? val) {
|
||||||
if (val == null || val.isEmpty) {
|
if (val == null || val.isEmpty) {
|
||||||
return FFLocalizations.of(context).getVariableText(
|
return FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'This field is required',
|
enText: 'This field is required',
|
||||||
|
|
|
@ -48,7 +48,8 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _initialize() async {
|
Future<void> _initialize() async {
|
||||||
_accessPass = await StorageHelper().get(SecureStorageKey.accessPass.value) ?? '';
|
_accessPass =
|
||||||
|
await StorageHelper().get(SecureStorageKey.accessPass.value) ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -89,7 +90,8 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
tablet: false,
|
tablet: false,
|
||||||
))
|
))
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -102,7 +104,8 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 12.0, 0.0, 12.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.arrow_back_rounded,
|
Icons.arrow_back_rounded,
|
||||||
color: Color(0xFF15161E),
|
color: Color(0xFF15161E),
|
||||||
|
@ -110,17 +113,20 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
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: 14.0,
|
||||||
fontWeight: FontWeight.w500,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
fontWeight: FontWeight.w500,
|
||||||
),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey('Plus Jakarta Sans'),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -128,11 +134,13 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'INSERT PASSWORD',
|
enText: 'INSERT PASSWORD',
|
||||||
ptText: _accessPass != '' ? 'ALTERAR SENHA' : 'ADICIONAR SENHA',
|
ptText:
|
||||||
|
_accessPass != '' ? 'ALTERAR SENHA' : 'ADICIONAR SENHA',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontFamily: 'Outfit',
|
fontFamily: 'Outfit',
|
||||||
|
@ -145,16 +153,20 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(enText: 'Enter your password to continue', ptText: 'Digite sua senha para continuar'),
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Enter your password to continue',
|
||||||
|
ptText: 'Digite sua senha para continuar'),
|
||||||
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: 14.0,
|
||||||
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'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -164,7 +176,8 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
16.0, 12.0, 16.0, 0.0),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
|
@ -183,29 +196,36 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
obscureText: !_model.keyTextFieldVisibility1,
|
obscureText: !_model.keyTextFieldVisibility1,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getVariableText(
|
labelText:
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Senha',
|
ptText: 'Senha',
|
||||||
enText: 'Password',
|
enText: 'Password',
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: 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: 14.0,
|
||||||
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'),
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getVariableText(
|
hintText: FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Digite a sua senha.....',
|
ptText: 'Digite a sua senha.....',
|
||||||
enText: 'Enter your password.....',
|
enText: 'Enter your password.....',
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: 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: 14.0,
|
||||||
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'),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -236,15 +256,20 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
fillColor:
|
||||||
contentPadding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0),
|
FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
contentPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 24.0, 20.0, 24.0),
|
||||||
suffixIcon: InkWell(
|
suffixIcon: InkWell(
|
||||||
onTap: () => setState(
|
onTap: () => setState(
|
||||||
() => _model.keyTextFieldVisibility1 = !_model.keyTextFieldVisibility1,
|
() => _model.keyTextFieldVisibility1 =
|
||||||
|
!_model.keyTextFieldVisibility1,
|
||||||
),
|
),
|
||||||
focusNode: FocusNode(skipTraversal: true),
|
focusNode: FocusNode(skipTraversal: true),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
_model.keyTextFieldVisibility1 ? Icons.visibility_outlined : Icons.visibility_off_outlined,
|
_model.keyTextFieldVisibility1
|
||||||
|
? Icons.visibility_outlined
|
||||||
|
: Icons.visibility_off_outlined,
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
size: 22.0,
|
size: 22.0,
|
||||||
),
|
),
|
||||||
|
@ -256,14 +281,20 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
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'),
|
||||||
),
|
),
|
||||||
maxLength: 4,
|
maxLength: 4,
|
||||||
maxLengthEnforcement: MaxLengthEnforcement.enforced,
|
maxLengthEnforcement: MaxLengthEnforcement.enforced,
|
||||||
buildCounter: (context, {required currentLength, required isFocused, maxLength}) => null,
|
buildCounter: (context,
|
||||||
|
{required currentLength,
|
||||||
|
required isFocused,
|
||||||
|
maxLength}) =>
|
||||||
|
null,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
validator: _model.keyTextFieldTextControllerValidator1.asValidator(context),
|
validator: _model.keyTextFieldTextControllerValidator1
|
||||||
|
.asValidator(context),
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||||
LengthLimitingTextInputFormatter(4),
|
LengthLimitingTextInputFormatter(4),
|
||||||
|
@ -277,14 +308,18 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (_model.formKey.currentState == null || !_model.formKey.currentState!.validate()) {
|
if (_model.formKey.currentState == null ||
|
||||||
|
!_model.formKey.currentState!.validate()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await widget.toggleActionStatus?.call(
|
await widget.toggleActionStatus?.call(
|
||||||
_model.keyTextFieldTextController1.text.isEmpty ? _model.keyTextFieldTextController2.text : _model.keyTextFieldTextController1.text,
|
_model.keyTextFieldTextController1.text.isEmpty
|
||||||
|
? _model.keyTextFieldTextController2.text
|
||||||
|
: _model.keyTextFieldTextController1.text,
|
||||||
);
|
);
|
||||||
// Navigator.pop(context, true);
|
// Navigator.pop(context, true);
|
||||||
context.pop(true);
|
context.pop(true);
|
||||||
|
@ -296,8 +331,10 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 270.0,
|
width: 270.0,
|
||||||
height: 50.0,
|
height: 50.0,
|
||||||
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: const Color(0xFF1AAB5F),
|
color: const Color(0xFF1AAB5F),
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
|
@ -305,7 +342,8 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
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(
|
||||||
|
|
|
@ -31,10 +31,13 @@ class DetailsComponentWidget extends StatefulWidget {
|
||||||
class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
late DetailsComponentModel _model;
|
late DetailsComponentModel _model;
|
||||||
|
|
||||||
LinkedHashMap<String, String> get labelsLinkedHashMap => LinkedHashMap.from(widget.labelsHashMap);
|
LinkedHashMap<String, String> get labelsLinkedHashMap =>
|
||||||
|
LinkedHashMap.from(widget.labelsHashMap);
|
||||||
|
|
||||||
List<LinkedHashMap<String, Color>> get statusLinkedHashMap =>
|
List<LinkedHashMap<String, Color>> get statusLinkedHashMap =>
|
||||||
widget.statusHashMap.map((map) => LinkedHashMap<String, Color>.from(map ?? {})).toList();
|
widget.statusHashMap
|
||||||
|
.map((map) => LinkedHashMap<String, Color>.from(map ?? {}))
|
||||||
|
.toList();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void setState(VoidCallback callback) {
|
void setState(VoidCallback callback) {
|
||||||
|
@ -59,7 +62,8 @@ 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);
|
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,
|
||||||
|
@ -94,7 +98,8 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
SizedBox(height: MediaQuery.of(context).size.height * 0.03),
|
SizedBox(height: MediaQuery.of(context).size.height * 0.03),
|
||||||
Row(
|
Row(
|
||||||
children: statusLinkedHashMap.expand((linkedHashMap) {
|
children: statusLinkedHashMap.expand((linkedHashMap) {
|
||||||
return linkedHashMap.entries.map((MapEntry<String, Color> item) {
|
return linkedHashMap.entries
|
||||||
|
.map((MapEntry<String, Color> item) {
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
|
@ -116,22 +121,30 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: item.value,
|
fillColor: item.value,
|
||||||
labelText: item.key,
|
labelText: item.key,
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: FlutterFlowTheme.of(context).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
),
|
),
|
||||||
fontSize: limitedBodyFontSize,
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
),
|
),
|
||||||
fontSize: limitedBodyFontSize,
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
|
@ -144,7 +157,8 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
@ -155,7 +169,8 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
validator: _model.textController1Validator.asValidator(context),
|
validator: _model.textController1Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -175,7 +190,8 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
@ -190,19 +206,26 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground, // Change border color here
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.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(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.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(
|
||||||
|
@ -212,25 +235,29 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground, // Change border color here
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground, // Change border color here
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground, // Change border color here
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground, // Change border color here
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -2,10 +2,12 @@ import 'package:hub/features/backend/index.dart';
|
||||||
import 'package:hub/shared/utils/validator_util.dart';
|
import 'package:hub/shared/utils/validator_util.dart';
|
||||||
|
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'forgot_password_template_component_widget.dart' show ForgotPasswordTemplateComponentWidget;
|
import 'forgot_password_template_component_widget.dart'
|
||||||
|
show ForgotPasswordTemplateComponentWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ForgotPasswordTemplateComponentModel extends FlutterFlowModel<ForgotPasswordTemplateComponentWidget> {
|
class ForgotPasswordTemplateComponentModel
|
||||||
|
extends FlutterFlowModel<ForgotPasswordTemplateComponentWidget> {
|
||||||
/// State fields for stateful widgets in this component.
|
/// State fields for stateful widgets in this component.
|
||||||
|
|
||||||
final formKey = GlobalKey<FormState>();
|
final formKey = GlobalKey<FormState>();
|
||||||
|
@ -13,7 +15,8 @@ class ForgotPasswordTemplateComponentModel extends FlutterFlowModel<ForgotPasswo
|
||||||
FocusNode? emailAddressFocusNode;
|
FocusNode? emailAddressFocusNode;
|
||||||
TextEditingController? emailAddressTextController;
|
TextEditingController? emailAddressTextController;
|
||||||
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
|
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
|
||||||
String? _emailAddressTextControllerValidator(BuildContext context, String? val) {
|
String? _emailAddressTextControllerValidator(
|
||||||
|
BuildContext context, String? val) {
|
||||||
if (val == null || val.isEmpty) {
|
if (val == null || val.isEmpty) {
|
||||||
return FFLocalizations.of(context).getText(
|
return FFLocalizations.of(context).getText(
|
||||||
'snnmkbyc' /* E-mail é Obrigatório */,
|
'snnmkbyc' /* E-mail é Obrigatório */,
|
||||||
|
|
|
@ -19,10 +19,12 @@ class ForgotPasswordTemplateComponentWidget extends StatefulWidget {
|
||||||
const ForgotPasswordTemplateComponentWidget({super.key});
|
const ForgotPasswordTemplateComponentWidget({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<ForgotPasswordTemplateComponentWidget> createState() => _ForgotPasswordTemplateComponentWidgetState();
|
State<ForgotPasswordTemplateComponentWidget> createState() =>
|
||||||
|
_ForgotPasswordTemplateComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTemplateComponentWidget> {
|
class _ForgotPasswordTemplateComponentWidgetState
|
||||||
|
extends State<ForgotPasswordTemplateComponentWidget> {
|
||||||
late ForgotPasswordTemplateComponentModel _model;
|
late ForgotPasswordTemplateComponentModel _model;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -49,9 +51,11 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
double limitedSubHeaderFontSize =
|
||||||
|
LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
double limitedHeaderFontSize =
|
||||||
|
LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
|
|
||||||
return Align(
|
return Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||||
|
@ -83,7 +87,8 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
tablet: false,
|
tablet: false,
|
||||||
))
|
))
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
16.0, 0.0, 16.0, 8.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
key: const ValueKey<String>('BackButton'),
|
key: const ValueKey<String>('BackButton'),
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
|
@ -97,7 +102,8 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 12.0, 0.0, 12.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.arrow_back_rounded,
|
Icons.arrow_back_rounded,
|
||||||
color: Color(0xFF15161E),
|
color: Color(0xFF15161E),
|
||||||
|
@ -105,16 +111,20 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
12.0, 0.0, 0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'',
|
'',
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: const Color(0xFF15161E),
|
color: const Color(0xFF15161E),
|
||||||
fontSize: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
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'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -123,30 +133,36 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
|
FFLocalizations.of(context)
|
||||||
|
.getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
|
||||||
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: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey('Outfit'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
16.0, 4.0, 16.0, 4.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText('wu2f7yzo' /* Não se preucupe nós vamos te a... */),
|
FFLocalizations.of(context).getText(
|
||||||
|
'wu2f7yzo' /* Não se preucupe nós vamos te a... */),
|
||||||
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: limitedSubHeaderFontSize,
|
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'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -154,7 +170,8 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
key: _model.formKey,
|
key: _model.formKey,
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
16.0, 12.0, 16.0, 0.0),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
|
@ -171,15 +188,18 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getText('mtz8l7ft' /* E-mail */),
|
labelText: FFLocalizations.of(context)
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
.getText('mtz8l7ft' /* E-mail */),
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
labelStyle:
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontSize: limitedInputFontSize,
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
letterSpacing: 0.0,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
fontWeight: FontWeight.w500,
|
fontSize: limitedInputFontSize,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
letterSpacing: 0.0,
|
||||||
),
|
fontWeight: FontWeight.w500,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey('Plus Jakarta Sans'),
|
||||||
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
|
@ -208,7 +228,8 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
contentPadding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0),
|
contentPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 24.0, 20.0, 24.0),
|
||||||
suffixIcon: Icon(
|
suffixIcon: Icon(
|
||||||
Icons.email,
|
Icons.email,
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -221,12 +242,14 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
fontSize: limitedInputFontSize,
|
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'),
|
||||||
),
|
),
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType.emailAddress,
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
validator: _model.emailAddressTextControllerValidator.asValidator(context),
|
validator: _model.emailAddressTextControllerValidator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -234,12 +257,17 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 24.0, 0.0, 0.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>('SendButtonWidget'),
|
key: const ValueKey<String>('SendButtonWidget'),
|
||||||
onPressed: (_model.emailAddressTextController.text == '' || !ValidatorUtil.isValidEmail(_model.emailAddressTextController.text))
|
onPressed: (_model.emailAddressTextController.text ==
|
||||||
|
'' ||
|
||||||
|
!ValidatorUtil.isValidEmail(
|
||||||
|
_model.emailAddressTextController.text))
|
||||||
? null
|
? null
|
||||||
: () async => await AuthenticationService.forgotPassword(
|
: () async =>
|
||||||
|
await AuthenticationService.forgotPassword(
|
||||||
context,
|
context,
|
||||||
_model.emailAddressTextController.text,
|
_model.emailAddressTextController.text,
|
||||||
).then((v) => v == true ? context.pop() : null),
|
).then((v) => v == true ? context.pop() : null),
|
||||||
|
@ -249,23 +277,28 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 270.0,
|
width: 270.0,
|
||||||
height: 50.0,
|
height: 50.0,
|
||||||
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:
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
color: Colors.white,
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
fontSize: limitedInputFontSize,
|
color: Colors.white,
|
||||||
letterSpacing: 0.0,
|
fontSize: limitedInputFontSize,
|
||||||
fontWeight: FontWeight.w500,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
fontWeight: FontWeight.w500,
|
||||||
),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey('Plus Jakarta Sans'),
|
||||||
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
disabledColor:
|
||||||
|
FlutterFlowTheme.of(context).customColor5,
|
||||||
disabledTextColor: Colors.white,
|
disabledTextColor: Colors.white,
|
||||||
),
|
),
|
||||||
showLoadingIndicator: true,
|
showLoadingIndicator: true,
|
||||||
|
|
|
@ -3,7 +3,9 @@ import 'package:hub/components/templates_components/liberation_history_item_deta
|
||||||
import 'package:hub/features/storage/index.dart';
|
import 'package:hub/features/storage/index.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
|
|
||||||
class LiberationHistoryItemDetailsTemplateComponentModel extends FlutterFlowModel<LiberationHistoryItemDetailsTemplateComponentWidget> {
|
class LiberationHistoryItemDetailsTemplateComponentModel
|
||||||
|
extends FlutterFlowModel<
|
||||||
|
LiberationHistoryItemDetailsTemplateComponentWidget> {
|
||||||
late final String devUUID;
|
late final String devUUID;
|
||||||
late final String userUUID;
|
late final String userUUID;
|
||||||
late final String cliUUID;
|
late final String cliUUID;
|
||||||
|
@ -26,8 +28,10 @@ class LiberationHistoryItemDetailsTemplateComponentModel extends FlutterFlowMode
|
||||||
|
|
||||||
Future<void> initDatabase() async {
|
Future<void> initDatabase() async {
|
||||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
userUUID =
|
||||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@ import 'package:hub/components/templates_components/liberation_history_item_deta
|
||||||
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';
|
||||||
|
|
||||||
class LiberationHistoryItemDetailsTemplateComponentWidget extends StatefulWidget {
|
class LiberationHistoryItemDetailsTemplateComponentWidget
|
||||||
|
extends StatefulWidget {
|
||||||
const LiberationHistoryItemDetailsTemplateComponentWidget({
|
const LiberationHistoryItemDetailsTemplateComponentWidget({
|
||||||
super.key,
|
super.key,
|
||||||
required this.name,
|
required this.name,
|
||||||
|
@ -39,7 +40,8 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(context, () => LiberationHistoryItemDetailsTemplateComponentModel());
|
_model = createModel(
|
||||||
|
context, () => LiberationHistoryItemDetailsTemplateComponentModel());
|
||||||
|
|
||||||
_model.textController1 ??= TextEditingController(text: widget.name);
|
_model.textController1 ??= TextEditingController(text: widget.name);
|
||||||
_model.textFieldFocusNode1 ??= FocusNode();
|
_model.textFieldFocusNode1 ??= FocusNode();
|
||||||
|
@ -104,10 +106,13 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].addToStart(const SizedBox(width: 10.0)).addToEnd(const SizedBox(width: 10.0)),
|
]
|
||||||
|
.addToStart(const SizedBox(width: 10.0))
|
||||||
|
.addToEnd(const SizedBox(width: 10.0)),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController1,
|
controller: _model.textController1,
|
||||||
focusNode: _model.textFieldFocusNode1,
|
focusNode: _model.textFieldFocusNode1,
|
||||||
|
@ -120,19 +125,25 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'dmazrriq' /* Nome */,
|
'dmazrriq' /* Nome */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -144,16 +155,18 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
validator: _model.textController1Validator.asValidator(context),
|
validator:
|
||||||
|
_model.textController1Validator.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
|
@ -172,19 +185,27 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'xx3ivbr4' /* Tipo */,
|
'xx3ivbr4' /* Tipo */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -196,22 +217,28 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
validator: _model.textController2Validator.asValidator(context),
|
validator: _model.textController2Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].addToStart(const SizedBox(width: 24.0)).addToEnd(const SizedBox(width: 24.0)),
|
]
|
||||||
|
.addToStart(const SizedBox(width: 24.0))
|
||||||
|
.addToEnd(const SizedBox(width: 24.0)),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController3,
|
controller: _model.textController3,
|
||||||
focusNode: _model.textFieldFocusNode3,
|
focusNode: _model.textFieldFocusNode3,
|
||||||
|
@ -224,19 +251,25 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'rhheok7k' /* Acesso */,
|
'rhheok7k' /* Acesso */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -248,20 +281,23 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
validator: _model.textController3Validator.asValidator(context),
|
validator:
|
||||||
|
_model.textController3Validator.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController4,
|
controller: _model.textController4,
|
||||||
focusNode: _model.textFieldFocusNode4,
|
focusNode: _model.textFieldFocusNode4,
|
||||||
|
@ -275,18 +311,24 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'w3tciqlv' /* Acionamento */,
|
'w3tciqlv' /* Acionamento */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -298,14 +340,16 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
validator: _model.textController4Validator.asValidator(context),
|
validator:
|
||||||
|
_model.textController4Validator.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -37,7 +37,8 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(context, () => MessageNotificationModalTemplateComponentModel());
|
_model = createModel(
|
||||||
|
context, () => MessageNotificationModalTemplateComponentModel());
|
||||||
|
|
||||||
_model.textController1 ??= TextEditingController(text: widget.message);
|
_model.textController1 ??= TextEditingController(text: widget.message);
|
||||||
_model.textFieldFocusNode1 ??= FocusNode();
|
_model.textFieldFocusNode1 ??= FocusNode();
|
||||||
|
@ -59,7 +60,8 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
double limitedSubHeaderFontSize =
|
||||||
|
LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
width: MediaQuery.sizeOf(context).width,
|
width: MediaQuery.sizeOf(context).width,
|
||||||
|
@ -79,7 +81,8 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController1,
|
controller: _model.textController1,
|
||||||
focusNode: _model.textFieldFocusNode1,
|
focusNode: _model.textFieldFocusNode1,
|
||||||
|
@ -94,17 +97,21 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
enText: 'Message',
|
enText: 'Message',
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: 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,
|
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,
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
|
@ -120,7 +127,8 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
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().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedBodyFontSize,
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
|
@ -146,20 +154,26 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
ptText: 'De',
|
ptText: 'De',
|
||||||
enText: 'From',
|
enText: 'From',
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
fontSize: limitedBodyFontSize,
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
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).labelMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
fontSize: limitedBodyFontSize,
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
|
@ -172,22 +186,27 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
validator: _model.textController2Validator.asValidator(context),
|
validator:
|
||||||
|
_model.textController2Validator.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].addToStart(const SizedBox(width: 24.0)).addToEnd(const SizedBox(width: 24.0)),
|
]
|
||||||
|
.addToStart(const SizedBox(width: 24.0))
|
||||||
|
.addToEnd(const SizedBox(width: 24.0)),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController3,
|
controller: _model.textController3,
|
||||||
focusNode: _model.textFieldFocusNode3,
|
focusNode: _model.textFieldFocusNode3,
|
||||||
|
@ -202,17 +221,21 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
enText: 'To',
|
enText: 'To',
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: 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,
|
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,
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
|
@ -228,7 +251,8 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
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().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedBodyFontSize,
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
|
|
|
@ -6,7 +6,8 @@ import 'package:hub/features/backend/index.dart';
|
||||||
import 'package:hub/features/storage/index.dart';
|
import 'package:hub/features/storage/index.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
|
|
||||||
class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisionalVisitPageWidget> {
|
class ScheduleProvisionalVisitPageModel
|
||||||
|
extends FlutterFlowModel<ScheduleProvisionalVisitPageWidget> {
|
||||||
String cliUUID = '';
|
String cliUUID = '';
|
||||||
String devUUID = '';
|
String devUUID = '';
|
||||||
String userUUID = '';
|
String userUUID = '';
|
||||||
|
@ -20,21 +21,25 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisi
|
||||||
void addToVisitors(dynamic item) => visitors.add(item);
|
void addToVisitors(dynamic item) => visitors.add(item);
|
||||||
void removeFromVisitors(dynamic item) => visitors.remove(item);
|
void removeFromVisitors(dynamic item) => visitors.remove(item);
|
||||||
void removeAtIndexFromVisitors(int index) => visitors.removeAt(index);
|
void removeAtIndexFromVisitors(int index) => visitors.removeAt(index);
|
||||||
void insertAtIndexInVisitors(int index, dynamic item) => visitors.insert(index, item);
|
void insertAtIndexInVisitors(int index, dynamic item) =>
|
||||||
void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) => visitors[index] = updateFn(visitors[index]);
|
visitors.insert(index, item);
|
||||||
|
void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) =>
|
||||||
|
visitors[index] = updateFn(visitors[index]);
|
||||||
|
|
||||||
List<String> docs = [];
|
List<String> docs = [];
|
||||||
void addToDocs(String item) => docs.add(item);
|
void addToDocs(String item) => docs.add(item);
|
||||||
void removeFromDocs(String item) => docs.remove(item);
|
void removeFromDocs(String item) => docs.remove(item);
|
||||||
void removeAtIndexFromDocs(int index) => docs.removeAt(index);
|
void removeAtIndexFromDocs(int index) => docs.removeAt(index);
|
||||||
void insertAtIndexInDocs(int index, String item) => docs.insert(index, item);
|
void insertAtIndexInDocs(int index, String item) => docs.insert(index, item);
|
||||||
void updateDocsAtIndex(int index, Function(String) updateFn) => docs[index] = updateFn(docs[index]);
|
void updateDocsAtIndex(int index, Function(String) updateFn) =>
|
||||||
|
docs[index] = updateFn(docs[index]);
|
||||||
|
|
||||||
final formKey = GlobalKey<FormState>();
|
final formKey = GlobalKey<FormState>();
|
||||||
FocusNode? personNameFocusNode;
|
FocusNode? personNameFocusNode;
|
||||||
TextEditingController? personNameTextController;
|
TextEditingController? personNameTextController;
|
||||||
String? Function(BuildContext, String?)? personNameTextControllerValidator;
|
String? Function(BuildContext, String?)? personNameTextControllerValidator;
|
||||||
String? _personNameTextControllerValidator(BuildContext context, String? val) {
|
String? _personNameTextControllerValidator(
|
||||||
|
BuildContext context, String? val) {
|
||||||
if (val == null || val.isEmpty) {
|
if (val == null || val.isEmpty) {
|
||||||
return FFLocalizations.of(context).getText('3hqg8buh');
|
return FFLocalizations.of(context).getText('3hqg8buh');
|
||||||
}
|
}
|
||||||
|
@ -55,9 +60,11 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisi
|
||||||
}
|
}
|
||||||
DateTime selectedDateTime;
|
DateTime selectedDateTime;
|
||||||
DateTime currentDateTime = DateTime.now().add(const Duration(minutes: 59));
|
DateTime currentDateTime = DateTime.now().add(const Duration(minutes: 59));
|
||||||
selectedDateTime = DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
selectedDateTime =
|
||||||
|
DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
||||||
try {
|
try {
|
||||||
selectedDateTime = DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
selectedDateTime =
|
||||||
|
DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return FFLocalizations.of(context).getVariableText(
|
return FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Formato de data inválido',
|
ptText: 'Formato de data inválido',
|
||||||
|
@ -87,7 +94,9 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisi
|
||||||
personNameTextController ??= TextEditingController();
|
personNameTextController ??= TextEditingController();
|
||||||
personNameFocusNode ??= FocusNode();
|
personNameFocusNode ??= FocusNode();
|
||||||
|
|
||||||
dateTimeTextController ??= TextEditingController(text: DateFormat('dd/MM/yyyy HH:mm:ss').format(DateTime.now().add(const Duration(days: 1))));
|
dateTimeTextController ??= TextEditingController(
|
||||||
|
text: DateFormat('dd/MM/yyyy HH:mm:ss')
|
||||||
|
.format(DateTime.now().add(const Duration(days: 1))));
|
||||||
dateTimeFocusNode ??= FocusNode();
|
dateTimeFocusNode ??= FocusNode();
|
||||||
|
|
||||||
notesTextController ??= TextEditingController();
|
notesTextController ??= TextEditingController();
|
||||||
|
@ -109,7 +118,8 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisi
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isFormValid() {
|
bool isFormValid() {
|
||||||
if (personNameTextController.text == '' || personNameTextController.text.length > 80) {
|
if (personNameTextController.text == '' ||
|
||||||
|
personNameTextController.text.length > 80) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,10 +129,12 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisi
|
||||||
|
|
||||||
DateTime selectedDateTime;
|
DateTime selectedDateTime;
|
||||||
DateTime currentDateTime = DateTime.now().add(const Duration(minutes: 59));
|
DateTime currentDateTime = DateTime.now().add(const Duration(minutes: 59));
|
||||||
selectedDateTime = DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
selectedDateTime =
|
||||||
|
DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
selectedDateTime = DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
selectedDateTime =
|
||||||
|
DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -136,10 +148,14 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisi
|
||||||
|
|
||||||
Future<void> init() async {
|
Future<void> init() async {
|
||||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
userUUID =
|
||||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
ownerName = (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? '';
|
cliUUID =
|
||||||
ownerUUID = (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
|
ownerName =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? '';
|
||||||
|
ownerUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? '';
|
||||||
setState?.call();
|
setState?.call();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,10 @@
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'qr_code_pass_key_template_component_widget.dart' show QrCodePassKeyTemplateComponentWidget;
|
import 'qr_code_pass_key_template_component_widget.dart'
|
||||||
|
show QrCodePassKeyTemplateComponentWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class QrCodePassKeyTemplateComponentModel extends FlutterFlowModel<QrCodePassKeyTemplateComponentWidget> {
|
class QrCodePassKeyTemplateComponentModel
|
||||||
|
extends FlutterFlowModel<QrCodePassKeyTemplateComponentWidget> {
|
||||||
/// State fields for stateful widgets in this component.
|
/// State fields for stateful widgets in this component.
|
||||||
|
|
||||||
final formKey = GlobalKey<FormState>();
|
final formKey = GlobalKey<FormState>();
|
||||||
|
@ -11,7 +13,8 @@ class QrCodePassKeyTemplateComponentModel extends FlutterFlowModel<QrCodePassKey
|
||||||
TextEditingController? keyTextFieldTextController;
|
TextEditingController? keyTextFieldTextController;
|
||||||
late bool keyTextFieldVisibility;
|
late bool keyTextFieldVisibility;
|
||||||
String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator;
|
String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator;
|
||||||
String? _keyTextFieldTextControllerValidator(BuildContext context, String? val) {
|
String? _keyTextFieldTextControllerValidator(
|
||||||
|
BuildContext context, String? val) {
|
||||||
if (val == null || val.isEmpty) {
|
if (val == null || val.isEmpty) {
|
||||||
return FFLocalizations.of(context).getVariableText(
|
return FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'This field is required',
|
enText: 'This field is required',
|
||||||
|
|
|
@ -20,10 +20,12 @@ class QrCodePassKeyTemplateComponentWidget extends StatefulWidget {
|
||||||
final Future Function(String key)? toggleActionStatus;
|
final Future Function(String key)? toggleActionStatus;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<QrCodePassKeyTemplateComponentWidget> createState() => _QrCodePassKeyTemplateComponentWidgetState();
|
State<QrCodePassKeyTemplateComponentWidget> createState() =>
|
||||||
|
_QrCodePassKeyTemplateComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemplateComponentWidget> {
|
class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
|
extends State<QrCodePassKeyTemplateComponentWidget> {
|
||||||
late QrCodePassKeyTemplateComponentModel _model;
|
late QrCodePassKeyTemplateComponentModel _model;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -83,7 +85,8 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
tablet: false,
|
tablet: false,
|
||||||
))
|
))
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
16.0, 0.0, 16.0, 8.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -96,7 +99,8 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 12.0, 0.0, 12.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.arrow_back_rounded,
|
Icons.arrow_back_rounded,
|
||||||
color: Color(0xFF15161E),
|
color: Color(0xFF15161E),
|
||||||
|
@ -104,16 +108,22 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
12.0, 0.0, 0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'',
|
'',
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: const Color(0xFF15161E),
|
color: const Color(0xFF15161E),
|
||||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 16, 16, 14),
|
fontSize:
|
||||||
|
LimitedFontSizeUtil.getCalculateFontSize(
|
||||||
|
context, 16, 16, 14),
|
||||||
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'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -122,7 +132,8 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 10.0, 0.0, 0.0),
|
padding:
|
||||||
|
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 */,
|
||||||
|
@ -130,15 +141,18 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
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: LimitedFontSizeUtil.getCalculateFontSize(context, 20, 20, 18),
|
fontSize: LimitedFontSizeUtil.getCalculateFontSize(
|
||||||
|
context, 20, 20, 18),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey('Outfit'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
padding:
|
||||||
|
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 ... */,
|
||||||
|
@ -146,10 +160,12 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
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: LimitedFontSizeUtil.getCalculateFontSize(context, 14, 14, 12),
|
fontSize: LimitedFontSizeUtil.getCalculateFontSize(
|
||||||
|
context, 14, 14, 12),
|
||||||
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'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -157,7 +173,8 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
key: _model.formKey,
|
key: _model.formKey,
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
16.0, 12.0, 16.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.keyTextFieldTextController,
|
controller: _model.keyTextFieldTextController,
|
||||||
focusNode: _model.keyTextFieldFocusNode,
|
focusNode: _model.keyTextFieldFocusNode,
|
||||||
|
@ -176,24 +193,32 @@ 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: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
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'),
|
||||||
),
|
),
|
||||||
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: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
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'),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -225,14 +250,18 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
),
|
),
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
contentPadding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0),
|
contentPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 24.0, 20.0, 24.0),
|
||||||
suffixIcon: InkWell(
|
suffixIcon: InkWell(
|
||||||
onTap: () => safeSetState(
|
onTap: () => safeSetState(
|
||||||
() => _model.keyTextFieldVisibility = !_model.keyTextFieldVisibility,
|
() => _model.keyTextFieldVisibility =
|
||||||
|
!_model.keyTextFieldVisibility,
|
||||||
),
|
),
|
||||||
focusNode: FocusNode(skipTraversal: true),
|
focusNode: FocusNode(skipTraversal: true),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
_model.keyTextFieldVisibility ? Icons.visibility_outlined : Icons.visibility_off_outlined,
|
_model.keyTextFieldVisibility
|
||||||
|
? Icons.visibility_outlined
|
||||||
|
: Icons.visibility_off_outlined,
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
size: 22.0,
|
size: 22.0,
|
||||||
),
|
),
|
||||||
|
@ -241,16 +270,23 @@ 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: LimitedFontSizeUtil.getInputFontSize(context),
|
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'),
|
||||||
),
|
),
|
||||||
maxLength: 4,
|
maxLength: 4,
|
||||||
maxLengthEnforcement: MaxLengthEnforcement.enforced,
|
maxLengthEnforcement: MaxLengthEnforcement.enforced,
|
||||||
buildCounter: (context, {required currentLength, required isFocused, maxLength}) => null,
|
buildCounter: (context,
|
||||||
|
{required currentLength,
|
||||||
|
required isFocused,
|
||||||
|
maxLength}) =>
|
||||||
|
null,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
validator: _model.keyTextFieldTextControllerValidator.asValidator(context),
|
validator: _model.keyTextFieldTextControllerValidator
|
||||||
|
.asValidator(context),
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||||
LengthLimitingTextInputFormatter(4),
|
LengthLimitingTextInputFormatter(4),
|
||||||
|
@ -261,10 +297,12 @@ 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: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 15),
|
padding:
|
||||||
|
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 ||
|
||||||
|
!_model.formKey.currentState!.validate()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await widget.toggleActionStatus?.call(
|
await widget.toggleActionStatus?.call(
|
||||||
|
@ -278,16 +316,22 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 270.0,
|
width: 270.0,
|
||||||
height: 50.0,
|
height: 50.0,
|
||||||
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: const Color(0xFF1AAB5F),
|
color: const Color(0xFF1AAB5F),
|
||||||
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: LimitedFontSizeUtil.getInputFontSize(context),
|
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'),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
|
|
|
@ -10,7 +10,8 @@ import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import '/flutter_flow/form_field_controller.dart';
|
import '/flutter_flow/form_field_controller.dart';
|
||||||
import 'regisiter_vistor_template_component_widget.dart';
|
import 'regisiter_vistor_template_component_widget.dart';
|
||||||
|
|
||||||
class RegisiterVistorTemplateComponentModel extends FlutterFlowModel<RegisiterVistorTemplateComponentWidget> {
|
class RegisiterVistorTemplateComponentModel
|
||||||
|
extends FlutterFlowModel<RegisiterVistorTemplateComponentWidget> {
|
||||||
Timer? _debounceTimer;
|
Timer? _debounceTimer;
|
||||||
late final String devUUID;
|
late final String devUUID;
|
||||||
late final String userUUID;
|
late final String userUUID;
|
||||||
|
@ -18,7 +19,8 @@ class RegisiterVistorTemplateComponentModel extends FlutterFlowModel<RegisiterVi
|
||||||
|
|
||||||
final unfocusNode = FocusNode();
|
final unfocusNode = FocusNode();
|
||||||
bool isDataUploading = false;
|
bool isDataUploading = false;
|
||||||
FFUploadedFile uploadedLocalFile = FFUploadedFile(bytes: Uint8List.fromList([]));
|
FFUploadedFile uploadedLocalFile =
|
||||||
|
FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||||
|
|
||||||
void debounce(Function() fn, Duration time) {
|
void debounce(Function() fn, Duration time) {
|
||||||
if (_debounceTimer != null) {
|
if (_debounceTimer != null) {
|
||||||
|
@ -42,12 +44,14 @@ class RegisiterVistorTemplateComponentModel extends FlutterFlowModel<RegisiterVi
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> getVisitanteByDocument(String document, BuildContext context) async {
|
Future<bool> getVisitanteByDocument(
|
||||||
|
String document, BuildContext context) async {
|
||||||
final response = await PhpGroup.getVisitorByDocCall.call(
|
final response = await PhpGroup.getVisitorByDocCall.call(
|
||||||
documento: document,
|
documento: document,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.jsonBody['visitante']['VTE_ID'] != '0' && response.jsonBody['error'] != 'false') {
|
if (response.jsonBody['visitante']['VTE_ID'] != '0' &&
|
||||||
|
response.jsonBody['error'] != 'false') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -90,7 +94,9 @@ class RegisiterVistorTemplateComponentModel extends FlutterFlowModel<RegisiterVi
|
||||||
TextEditingController? textController4;
|
TextEditingController? textController4;
|
||||||
String? Function(BuildContext, String?)? textController4Validator;
|
String? Function(BuildContext, String?)? textController4Validator;
|
||||||
String? _textController4Validator(BuildContext context, String? val) {
|
String? _textController4Validator(BuildContext context, String? val) {
|
||||||
if (val != null && val.isNotEmpty && ValidatorUtil.isValidEmail(val) == false) {
|
if (val != null &&
|
||||||
|
val.isNotEmpty &&
|
||||||
|
ValidatorUtil.isValidEmail(val) == false) {
|
||||||
return FFLocalizations.of(context).getVariableText(
|
return FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Invalid email',
|
enText: 'Invalid email',
|
||||||
ptText: 'Email inválido',
|
ptText: 'Email inválido',
|
||||||
|
@ -130,8 +136,10 @@ class RegisiterVistorTemplateComponentModel extends FlutterFlowModel<RegisiterVi
|
||||||
|
|
||||||
Future<void> initializeDatabase() async {
|
Future<void> initializeDatabase() async {
|
||||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
userUUID =
|
||||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,13 +24,16 @@ class RegisiterVistorTemplateComponentWidget extends StatefulWidget {
|
||||||
final String source;
|
final String source;
|
||||||
final String? doc;
|
final String? doc;
|
||||||
|
|
||||||
const RegisiterVistorTemplateComponentWidget({super.key, required this.source, this.doc});
|
const RegisiterVistorTemplateComponentWidget(
|
||||||
|
{super.key, required this.source, this.doc});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<RegisiterVistorTemplateComponentWidget> createState() => _RegisiterVistorTemplateComponentWidgetState();
|
State<RegisiterVistorTemplateComponentWidget> createState() =>
|
||||||
|
_RegisiterVistorTemplateComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistorTemplateComponentWidget> {
|
class _RegisiterVistorTemplateComponentWidgetState
|
||||||
|
extends State<RegisiterVistorTemplateComponentWidget> {
|
||||||
late RegisiterVistorTemplateComponentModel _model;
|
late RegisiterVistorTemplateComponentModel _model;
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
@ -50,7 +53,8 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
|
|
||||||
visitorAlreadyRegistered = BehaviorSubject<bool>.seeded(false);
|
visitorAlreadyRegistered = BehaviorSubject<bool>.seeded(false);
|
||||||
|
|
||||||
_model = createModel(context, () => RegisiterVistorTemplateComponentModel());
|
_model =
|
||||||
|
createModel(context, () => RegisiterVistorTemplateComponentModel());
|
||||||
|
|
||||||
_model.textController1 ??= TextEditingController();
|
_model.textController1 ??= TextEditingController();
|
||||||
_model.textFieldFocusNode1 ??= FocusNode();
|
_model.textFieldFocusNode1 ??= FocusNode();
|
||||||
|
@ -87,15 +91,19 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_model.textController1.text.isEmpty || _model.textController1.text == '') {
|
if (_model.textController1.text.isEmpty ||
|
||||||
|
_model.textController1.text == '') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_model.dropDownValue == null || _model.dropDownValue!.isEmpty || _model.dropDownValue == '') {
|
if (_model.dropDownValue == null ||
|
||||||
|
_model.dropDownValue!.isEmpty ||
|
||||||
|
_model.dropDownValue == '') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_model.textController2.text.isEmpty || _model.textController2.text == '') {
|
if (_model.textController2.text.isEmpty ||
|
||||||
|
_model.textController2.text == '') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +111,9 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_model.textController4.text.isNotEmpty && _model.textController4.text != '' && ValidatorUtil.isValidEmail(_model.textController4.text) == false) {
|
if (_model.textController4.text.isNotEmpty &&
|
||||||
|
_model.textController4.text != '' &&
|
||||||
|
ValidatorUtil.isValidEmail(_model.textController4.text) == false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,8 +123,10 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
double limitedHeaderFontSize =
|
||||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
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),
|
||||||
|
@ -141,7 +153,8 @@ 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(24.0, 0.0, 24.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... */,
|
||||||
|
@ -149,16 +162,19 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
overflow: TextOverflow.clip,
|
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: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
TextFormField(
|
TextFormField(
|
||||||
controller: _model.textController2,
|
controller: _model.textController2,
|
||||||
|
@ -177,19 +193,28 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'rl8tvwnr' /* Documento */,
|
'rl8tvwnr' /* Documento */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.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(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
fontSize: limitedInputFontSize,
|
FlutterFlowTheme.of(context)
|
||||||
),
|
.labelMediumFamily),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
|
hintStyle:
|
||||||
|
FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).customColor6,
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
|
@ -228,22 +253,29 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
_model.debounce(() async {
|
_model.debounce(() async {
|
||||||
var data = await _model.getVisitanteByDocument(value, context);
|
var data = await _model.getVisitanteByDocument(
|
||||||
|
value, context);
|
||||||
setState(() {
|
setState(() {
|
||||||
_isVisitorRegistered = data;
|
_isVisitorRegistered = data;
|
||||||
});
|
});
|
||||||
}, const Duration(milliseconds: 500));
|
}, const Duration(milliseconds: 500));
|
||||||
},
|
},
|
||||||
validator: _model.textController2Validator.asValidator(context),
|
validator:
|
||||||
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]')), LengthLimitingTextInputFormatter(20)],
|
_model.textController2Validator.asValidator(context),
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||||
|
LengthLimitingTextInputFormatter(20)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
_model.textController2.text.isEmpty
|
_model.textController2.text.isEmpty
|
||||||
? const SizedBox()
|
? const SizedBox()
|
||||||
|
@ -253,17 +285,29 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.only(top: 5, start: 12),
|
padding: const EdgeInsetsDirectional.only(
|
||||||
|
top: 5, start: 12),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context)
|
||||||
|
.getVariableText(
|
||||||
enText: 'Visitor already registered',
|
enText: 'Visitor already registered',
|
||||||
ptText: 'Visitante já cadastrado',
|
ptText: 'Visitante já cadastrado',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).labelSmall.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.labelSmall
|
||||||
|
.override(
|
||||||
fontFamily: 'Nunito',
|
fontFamily: 'Nunito',
|
||||||
color: Theme.of(context).brightness == Brightness.dark
|
color: Theme.of(context)
|
||||||
? Color.alphaBlend(Colors.white.withOpacity(0.7), Colors.red)
|
.brightness ==
|
||||||
: Color.alphaBlend(Colors.black.withOpacity(0.25), Colors.red),
|
Brightness.dark
|
||||||
|
? Color.alphaBlend(
|
||||||
|
Colors.white
|
||||||
|
.withOpacity(0.7),
|
||||||
|
Colors.red)
|
||||||
|
: Color.alphaBlend(
|
||||||
|
Colors.black
|
||||||
|
.withOpacity(0.25),
|
||||||
|
Colors.red),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
)),
|
)),
|
||||||
|
@ -274,7 +318,8 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController1,
|
controller: _model.textController1,
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
|
@ -293,18 +338,26 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'v7g73yik' /* Nome */,
|
'v7g73yik' /* Nome */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.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(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.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(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
|
@ -345,25 +398,30 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
maxLength: 80,
|
maxLength: 80,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
||||||
validator: _model.textController1Validator.asValidator(context),
|
validator:
|
||||||
|
_model.textController1Validator.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
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(
|
||||||
children: [
|
children: [
|
||||||
FlutterFlowDropDown<String>(
|
FlutterFlowDropDown<String>(
|
||||||
controller: _model.dropDownValueController ??= FormFieldController<String>(null),
|
controller: _model.dropDownValueController ??=
|
||||||
|
FormFieldController<String>(null),
|
||||||
options: [
|
options: [
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'n8vddmcq' /* Visitante */,
|
'n8vddmcq' /* Visitante */,
|
||||||
|
@ -372,14 +430,20 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
'9luaa09e' /* Prestador de Serviço */,
|
'9luaa09e' /* Prestador de Serviço */,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
onChanged: (val) => setState(() => _model.dropDownValue = val),
|
onChanged: (val) =>
|
||||||
|
setState(() => _model.dropDownValue = val),
|
||||||
width: MediaQuery.sizeOf(context).width * 0.9,
|
width: MediaQuery.sizeOf(context).width * 0.9,
|
||||||
// height: 44.0,
|
// height: 44.0,
|
||||||
textStyle: FlutterFlowTheme.of(context).bodyMedium.override(
|
textStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
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: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getVariableText(
|
hintText: FFLocalizations.of(context).getVariableText(
|
||||||
|
@ -395,29 +459,39 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
borderColor: FlutterFlowTheme.of(context).customColor6,
|
borderColor: FlutterFlowTheme.of(context).customColor6,
|
||||||
borderWidth: 0.5,
|
borderWidth: 0.5,
|
||||||
borderRadius: 8.0,
|
borderRadius: 8.0,
|
||||||
margin: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 0.0),
|
margin: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
16.0, 0.0, 16.0, 0.0),
|
||||||
hidesUnderline: true,
|
hidesUnderline: true,
|
||||||
isOverButton: true,
|
isOverButton: true,
|
||||||
isSearchable: false,
|
isSearchable: false,
|
||||||
isMultiSelect: false,
|
isMultiSelect: false,
|
||||||
),
|
),
|
||||||
if (_model.dropDownValue == null || _model.dropDownValue == '')
|
if (_model.dropDownValue == null ||
|
||||||
|
_model.dropDownValue == '')
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
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: 'Select the type of visitor',
|
enText: 'Select the type of visitor',
|
||||||
ptText: 'Selecione o tipo de visitante',
|
ptText: 'Selecione o tipo de visitante',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
.bodySmall
|
||||||
color: FlutterFlowTheme.of(context).customColor6,
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.bodySmallFamily,
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.customColor6,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodySmallFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
|
@ -427,10 +501,12 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: Builder(
|
child: Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if ((_model.uploadedLocalFile.bytes?.isNotEmpty ?? false)) {
|
if ((_model.uploadedLocalFile.bytes?.isNotEmpty ??
|
||||||
|
false)) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -439,13 +515,15 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
setState(() {
|
setState(() {
|
||||||
_model.isDataUploading = false;
|
_model.isDataUploading = false;
|
||||||
_model.uploadedLocalFile = FFUploadedFile(bytes: Uint8List.fromList([]));
|
_model.uploadedLocalFile =
|
||||||
|
FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
child: Image.memory(
|
child: Image.memory(
|
||||||
_model.uploadedLocalFile.bytes ?? Uint8List.fromList([]),
|
_model.uploadedLocalFile.bytes ??
|
||||||
|
Uint8List.fromList([]),
|
||||||
width: 300.0,
|
width: 300.0,
|
||||||
height: 200.0,
|
height: 200.0,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
|
@ -474,23 +552,27 @@ 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, 10.0, 0.0, 15.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
20.0, 10.0, 0.0, 15.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'bqpucwh0' /* Contatos */,
|
'bqpucwh0' /* Contatos */,
|
||||||
),
|
),
|
||||||
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: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedSubHeaderFontSize,
|
fontSize: limitedSubHeaderFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController3,
|
controller: _model.textController3,
|
||||||
focusNode: _model.textFieldFocusNode3,
|
focusNode: _model.textFieldFocusNode3,
|
||||||
|
@ -501,7 +583,11 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
|
|
||||||
maxLength: 25,
|
maxLength: 25,
|
||||||
keyboardType: TextInputType.phone,
|
keyboardType: TextInputType.phone,
|
||||||
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9, +, -, (, )]')), LengthLimitingTextInputFormatter(25)],
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.allow(
|
||||||
|
RegExp('[0-9, +, -, (, )]')),
|
||||||
|
LengthLimitingTextInputFormatter(25)
|
||||||
|
],
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
@ -509,18 +595,26 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'h84ls2r6' /* Telefone */,
|
'h84ls2r6' /* Telefone */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.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(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.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(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
|
@ -557,10 +651,12 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
// validator:
|
// validator:
|
||||||
|
@ -568,7 +664,8 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController4,
|
controller: _model.textController4,
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -588,18 +685,26 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'fqp7qmka' /* Email */,
|
'fqp7qmka' /* Email */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.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(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.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(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
|
@ -636,27 +741,33 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType.emailAddress,
|
||||||
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
||||||
validator: _model.textController4Validator.asValidator(context),
|
validator:
|
||||||
|
_model.textController4Validator.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 65.0, 0.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(0.0, 65.0, 0.0, 0.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: _isFormValid(context)
|
onPressed: _isFormValid(context)
|
||||||
? () async {
|
? () async {
|
||||||
_model.imgBase64 = await ImageUtils.convertImageFileToBase64(
|
_model.imgBase64 =
|
||||||
|
await ImageUtils.convertImageFileToBase64(
|
||||||
_model.uploadedLocalFile,
|
_model.uploadedLocalFile,
|
||||||
);
|
);
|
||||||
_model.scheduleVisitor = await PhpGroup.postScheduleVisitorCall
|
_model.scheduleVisitor =
|
||||||
.call(
|
await PhpGroup.postScheduleVisitorCall
|
||||||
|
.call(
|
||||||
documento: _model.textController2.text,
|
documento: _model.textController2.text,
|
||||||
nome: _model.textController1.text,
|
nome: _model.textController1.text,
|
||||||
tipo: _model.dropDownValue ==
|
tipo: _model.dropDownValue ==
|
||||||
|
@ -667,7 +778,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
: 'P',
|
: 'P',
|
||||||
foto: 'base64;jpeg,${_model.imgBase64}',
|
foto: 'base64;jpeg,${_model.imgBase64}',
|
||||||
)
|
)
|
||||||
.onError((e, s) async {
|
.onError((e, s) async {
|
||||||
return await DialogUtil.errorDefault(context);
|
return await DialogUtil.errorDefault(context);
|
||||||
});
|
});
|
||||||
if (PhpGroup.postScheduleVisitorCall.error(
|
if (PhpGroup.postScheduleVisitorCall.error(
|
||||||
|
@ -680,16 +791,23 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
_model.textController3?.clear();
|
_model.textController3?.clear();
|
||||||
_model.textController4?.clear();
|
_model.textController4?.clear();
|
||||||
_model.dropDownValueController?.reset();
|
_model.dropDownValueController?.reset();
|
||||||
_model.uploadedLocalFile = FFUploadedFile(bytes: Uint8List.fromList([]));
|
_model.uploadedLocalFile = FFUploadedFile(
|
||||||
|
bytes: Uint8List.fromList([]));
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content:
|
content: Text(
|
||||||
Text(FFLocalizations.of(context).getVariableText(ptText: 'Visitante cadastrado com sucesso.', enText: 'Visitor successfully registered.'),
|
FFLocalizations.of(context).getVariableText(
|
||||||
style: TextStyle(
|
ptText:
|
||||||
color: FlutterFlowTheme.of(context).info,
|
'Visitante cadastrado com sucesso.',
|
||||||
fontSize: limitedInputFontSize,
|
enText:
|
||||||
)),
|
'Visitor successfully registered.'),
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
style: TextStyle(
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(context).info,
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
|
)),
|
||||||
|
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,
|
||||||
behavior: SnackBarBehavior.floating,
|
behavior: SnackBarBehavior.floating,
|
||||||
|
@ -702,19 +820,28 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
_formKey.currentState?.reset();
|
_formKey.currentState?.reset();
|
||||||
if (widget.source == 'VisitorNotFoundComponent') {
|
if (widget.source ==
|
||||||
|
'VisitorNotFoundComponent') {
|
||||||
Navigator.pop(context, true);
|
Navigator.pop(context, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return await DialogUtil.error(
|
return await DialogUtil.error(
|
||||||
context,
|
context,
|
||||||
PhpGroup.postScheduleVisitorCall.errorMsg(_model.scheduleVisitor?.jsonBody) == null
|
PhpGroup.postScheduleVisitorCall.errorMsg(
|
||||||
? FFLocalizations.of(context).getVariableText(
|
_model
|
||||||
ptText: 'Erro ao se conectar com o servidor',
|
.scheduleVisitor?.jsonBody) ==
|
||||||
|
null
|
||||||
|
? FFLocalizations.of(context)
|
||||||
|
.getVariableText(
|
||||||
|
ptText:
|
||||||
|
'Erro ao se conectar com o servidor',
|
||||||
enText: 'Error connecting to server',
|
enText: 'Error connecting to server',
|
||||||
)
|
)
|
||||||
: PhpGroup.postScheduleVisitorCall.errorMsg(_model.scheduleVisitor?.jsonBody).toString());
|
: PhpGroup.postScheduleVisitorCall
|
||||||
|
.errorMsg(
|
||||||
|
_model.scheduleVisitor?.jsonBody)
|
||||||
|
.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
|
@ -724,14 +851,20 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
height: 30.0 * MediaQuery.textScalerOf(context).scale(1),
|
height: 30.0 * MediaQuery.textScalerOf(context).scale(1),
|
||||||
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(
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
80.0, 0.0, 80.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)
|
||||||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
.titleSmall
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
color: FlutterFlowTheme.of(context).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
|
@ -747,7 +880,10 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].divide(const SizedBox(height: 10.0)).addToStart(const SizedBox(height: 30.0)).addToEnd(const SizedBox(height: 30.0)),
|
]
|
||||||
|
.divide(const SizedBox(height: 10.0))
|
||||||
|
.addToStart(const SizedBox(height: 30.0))
|
||||||
|
.addToEnd(const SizedBox(height: 30.0)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,16 +1,19 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'sign_in_template_component_widget.dart' show SignInTemplateComponentWidget;
|
import 'sign_in_template_component_widget.dart'
|
||||||
|
show SignInTemplateComponentWidget;
|
||||||
|
|
||||||
class SignInTemplateComponentModel extends FlutterFlowModel<SignInTemplateComponentWidget> {
|
class SignInTemplateComponentModel
|
||||||
|
extends FlutterFlowModel<SignInTemplateComponentWidget> {
|
||||||
final formKey = GlobalKey<FormState>();
|
final formKey = GlobalKey<FormState>();
|
||||||
final unfocusNode = FocusNode();
|
final unfocusNode = FocusNode();
|
||||||
FocusNode? emailAddressFocusNode;
|
FocusNode? emailAddressFocusNode;
|
||||||
TextEditingController? emailAddressTextController;
|
TextEditingController? emailAddressTextController;
|
||||||
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
|
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
|
||||||
SignInTemplateComponentModel();
|
SignInTemplateComponentModel();
|
||||||
String? _emailAddressTextControllerValidator(BuildContext context, String? val) {
|
String? _emailAddressTextControllerValidator(
|
||||||
|
BuildContext context, String? val) {
|
||||||
if (val == null || val.isEmpty) {
|
if (val == null || val.isEmpty) {
|
||||||
return FFLocalizations.of(context).getText(
|
return FFLocalizations.of(context).getText(
|
||||||
'xhnawzcb' /* Campo é necessário */,
|
'xhnawzcb' /* Campo é necessário */,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,14 +1,18 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'sign_up_template_component_widget.dart' show SignUpTemplateComponentWidget;
|
import 'sign_up_template_component_widget.dart'
|
||||||
|
show SignUpTemplateComponentWidget;
|
||||||
|
|
||||||
class SignUpTemplateComponentModel extends FlutterFlowModel<SignUpTemplateComponentWidget> {
|
class SignUpTemplateComponentModel
|
||||||
|
extends FlutterFlowModel<SignUpTemplateComponentWidget> {
|
||||||
final formKey = GlobalKey<FormState>();
|
final formKey = GlobalKey<FormState>();
|
||||||
FocusNode? nameRegisterFormFocusNode;
|
FocusNode? nameRegisterFormFocusNode;
|
||||||
TextEditingController? nameRegisterFormTextController;
|
TextEditingController? nameRegisterFormTextController;
|
||||||
String? Function(BuildContext, String?)? nameRegisterFormTextControllerValidator;
|
String? Function(BuildContext, String?)?
|
||||||
String? _nameRegisterFormTextControllerValidator(BuildContext context, String? val) {
|
nameRegisterFormTextControllerValidator;
|
||||||
|
String? _nameRegisterFormTextControllerValidator(
|
||||||
|
BuildContext context, String? val) {
|
||||||
if (val == null || val.isEmpty) {
|
if (val == null || val.isEmpty) {
|
||||||
return FFLocalizations.of(context).getText(
|
return FFLocalizations.of(context).getText(
|
||||||
'3bs10dfq' /* Campo é necessário */,
|
'3bs10dfq' /* Campo é necessário */,
|
||||||
|
@ -20,8 +24,10 @@ class SignUpTemplateComponentModel extends FlutterFlowModel<SignUpTemplateCompon
|
||||||
|
|
||||||
FocusNode? emailRegisterFormFocusNode;
|
FocusNode? emailRegisterFormFocusNode;
|
||||||
TextEditingController? emailRegisterFormTextController;
|
TextEditingController? emailRegisterFormTextController;
|
||||||
String? Function(BuildContext, String?)? emailRegisterFormTextControllerValidator;
|
String? Function(BuildContext, String?)?
|
||||||
String? _emailRegisterFormTextControllerValidator(BuildContext context, String? val) {
|
emailRegisterFormTextControllerValidator;
|
||||||
|
String? _emailRegisterFormTextControllerValidator(
|
||||||
|
BuildContext context, String? val) {
|
||||||
if (val == null || val.isEmpty) {
|
if (val == null || val.isEmpty) {
|
||||||
return FFLocalizations.of(context).getText(
|
return FFLocalizations.of(context).getText(
|
||||||
'mlvw63yj' /* Campo é necessário */,
|
'mlvw63yj' /* Campo é necessário */,
|
||||||
|
@ -39,8 +45,10 @@ class SignUpTemplateComponentModel extends FlutterFlowModel<SignUpTemplateCompon
|
||||||
FocusNode? passwordRegisterFormFocusNode;
|
FocusNode? passwordRegisterFormFocusNode;
|
||||||
TextEditingController? passwordRegisterFormTextController;
|
TextEditingController? passwordRegisterFormTextController;
|
||||||
late bool passwordRegisterFormVisibility;
|
late bool passwordRegisterFormVisibility;
|
||||||
String? Function(BuildContext, String?)? passwordRegisterFormTextControllerValidator;
|
String? Function(BuildContext, String?)?
|
||||||
String? _passwordRegisterFormTextControllerValidator(BuildContext context, String? val) {
|
passwordRegisterFormTextControllerValidator;
|
||||||
|
String? _passwordRegisterFormTextControllerValidator(
|
||||||
|
BuildContext context, String? val) {
|
||||||
if (val == null || val.isEmpty) {
|
if (val == null || val.isEmpty) {
|
||||||
return FFLocalizations.of(context).getText(
|
return FFLocalizations.of(context).getText(
|
||||||
'6nn79lmh' /* Campo é necessário */,
|
'6nn79lmh' /* Campo é necessário */,
|
||||||
|
@ -60,10 +68,13 @@ class SignUpTemplateComponentModel extends FlutterFlowModel<SignUpTemplateCompon
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {
|
void initState(BuildContext context) {
|
||||||
nameRegisterFormTextControllerValidator = _nameRegisterFormTextControllerValidator;
|
nameRegisterFormTextControllerValidator =
|
||||||
emailRegisterFormTextControllerValidator = _emailRegisterFormTextControllerValidator;
|
_nameRegisterFormTextControllerValidator;
|
||||||
|
emailRegisterFormTextControllerValidator =
|
||||||
|
_emailRegisterFormTextControllerValidator;
|
||||||
passwordRegisterFormVisibility = false;
|
passwordRegisterFormVisibility = false;
|
||||||
passwordRegisterFormTextControllerValidator = _passwordRegisterFormTextControllerValidator;
|
passwordRegisterFormTextControllerValidator =
|
||||||
|
_passwordRegisterFormTextControllerValidator;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -19,13 +19,16 @@ 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;
|
||||||
|
@ -91,7 +94,8 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _initialize() async {
|
Future<void> _initialize() async {
|
||||||
_deviceType = (await StorageHelper().get(SecureStorageKey.deviceType.value)) ?? '';
|
_deviceType =
|
||||||
|
(await StorageHelper().get(SecureStorageKey.deviceType.value)) ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -107,19 +111,24 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
final double screenWidth = mediaQuery.size.width;
|
final double screenWidth = mediaQuery.size.width;
|
||||||
final double screenHeight = mediaQuery.size.height;
|
final double screenHeight = mediaQuery.size.height;
|
||||||
|
|
||||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
double limitedHeaderFontSize =
|
||||||
|
LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
|
|
||||||
bool isFormInvalid() {
|
bool isFormInvalid() {
|
||||||
if (_model.nameRegisterFormTextController.text == '' || _model.emailRegisterFormTextController.text == '' || _model.passwordRegisterFormTextController.text == '') {
|
if (_model.nameRegisterFormTextController.text == '' ||
|
||||||
|
_model.emailRegisterFormTextController.text == '' ||
|
||||||
|
_model.passwordRegisterFormTextController.text == '') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ValidatorUtil.isValidEmail(_model.emailRegisterFormTextController.text)) {
|
if (!ValidatorUtil.isValidEmail(
|
||||||
|
_model.emailRegisterFormTextController.text)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ValidatorUtil.isValidPassword(_model.passwordRegisterFormTextController.text)) {
|
if (!ValidatorUtil.isValidPassword(
|
||||||
|
_model.passwordRegisterFormTextController.text)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,13 +165,17 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
'49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
'49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.displaySmall
|
||||||
|
.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color:
|
||||||
|
FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
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'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -194,7 +207,8 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
maxWidth: 570.0,
|
maxWidth: 570.0,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground,
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
child: Align(
|
child: Align(
|
||||||
|
@ -203,271 +217,510 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
padding: const EdgeInsets.all(32.0),
|
padding: const EdgeInsets.all(32.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Form(
|
Form(
|
||||||
key: _model.formKey,
|
key: _model.formKey,
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
autovalidateMode:
|
||||||
|
AutovalidateMode.onUserInteraction,
|
||||||
child: Column(
|
child: 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: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
key: const ValueKey<String>('nameTextFormField'),
|
key: const ValueKey<String>(
|
||||||
controller: _model.nameRegisterFormTextController,
|
'nameTextFormField'),
|
||||||
focusNode: _model.nameRegisterFormFocusNode,
|
controller: _model
|
||||||
onChanged: (_) => EasyDebounce.debounce(
|
.nameRegisterFormTextController,
|
||||||
|
focusNode: _model
|
||||||
|
.nameRegisterFormFocusNode,
|
||||||
|
onChanged: (_) =>
|
||||||
|
EasyDebounce.debounce(
|
||||||
'_model.nameRegisterFormTextController',
|
'_model.nameRegisterFormTextController',
|
||||||
const Duration(milliseconds: 500),
|
const Duration(
|
||||||
|
milliseconds: 500),
|
||||||
() => setState(() {}),
|
() => setState(() {}),
|
||||||
),
|
),
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
autofillHints: const [AutofillHints.name],
|
autofillHints: const [
|
||||||
|
AutofillHints.name
|
||||||
|
],
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText:
|
||||||
|
FFLocalizations.of(
|
||||||
|
context)
|
||||||
|
.getText(
|
||||||
'3corpwhd' /* Nome */,
|
'3corpwhd' /* Nome */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
labelStyle: FlutterFlowTheme
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
.of(context)
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.labelLarge
|
||||||
fontSize: limitedInputFontSize,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Plus Jakarta Sans',
|
||||||
|
color: FlutterFlowTheme
|
||||||
|
.of(context)
|
||||||
|
.primaryText,
|
||||||
|
fontSize:
|
||||||
|
limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight:
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
FontWeight.w500,
|
||||||
|
useGoogleFonts:
|
||||||
|
GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
'Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder:
|
||||||
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).customColor1,
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.customColor1,
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.0),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder:
|
||||||
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).success,
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.success,
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.0),
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder:
|
||||||
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.error,
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.0),
|
||||||
),
|
),
|
||||||
errorStyle: TextStyle(
|
errorStyle: TextStyle(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily:
|
||||||
color: FlutterFlowTheme.of(context).error,
|
'Plus Jakarta Sans',
|
||||||
fontSize: limitedInputFontSize,
|
color:
|
||||||
fontWeight: FontWeight.w400,
|
FlutterFlowTheme.of(
|
||||||
fontStyle: FontStyle.normal,
|
context)
|
||||||
|
.error,
|
||||||
|
fontSize:
|
||||||
|
limitedInputFontSize,
|
||||||
|
fontWeight:
|
||||||
|
FontWeight.w400,
|
||||||
|
fontStyle:
|
||||||
|
FontStyle.normal,
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder:
|
||||||
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.error,
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.0),
|
||||||
),
|
),
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
fillColor:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.primaryBackground,
|
||||||
suffixIcon: Icon(
|
suffixIcon: Icon(
|
||||||
Icons.person,
|
Icons.person,
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.accent1,
|
||||||
size: 22.0,
|
size: 22.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
style: FlutterFlowTheme.of(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
context)
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.bodyLarge
|
||||||
fontSize: limitedInputFontSize,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Plus Jakarta Sans',
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.primaryText,
|
||||||
|
fontSize:
|
||||||
|
limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight:
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
FontWeight.w500,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
'Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
validator: _model.nameRegisterFormTextControllerValidator.asValidator(context),
|
validator: _model
|
||||||
|
.nameRegisterFormTextControllerValidator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
key: const ValueKey<String>('emailTextFormField'),
|
key: const ValueKey<String>(
|
||||||
controller: _model.emailRegisterFormTextController,
|
'emailTextFormField'),
|
||||||
focusNode: _model.emailRegisterFormFocusNode,
|
controller: _model
|
||||||
onChanged: (_) => EasyDebounce.debounce(
|
.emailRegisterFormTextController,
|
||||||
|
focusNode: _model
|
||||||
|
.emailRegisterFormFocusNode,
|
||||||
|
onChanged: (_) =>
|
||||||
|
EasyDebounce.debounce(
|
||||||
'_model.emailRegisterFormTextController',
|
'_model.emailRegisterFormTextController',
|
||||||
const Duration(milliseconds: 500),
|
const Duration(
|
||||||
|
milliseconds: 500),
|
||||||
() => setState(() {}),
|
() => setState(() {}),
|
||||||
),
|
),
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
autofillHints: const [AutofillHints.email],
|
autofillHints: const [
|
||||||
|
AutofillHints.email
|
||||||
|
],
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText:
|
||||||
|
FFLocalizations.of(
|
||||||
|
context)
|
||||||
|
.getText(
|
||||||
'80wonb69' /* Email */,
|
'80wonb69' /* Email */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
labelStyle: FlutterFlowTheme
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
.of(context)
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.labelLarge
|
||||||
fontSize: limitedInputFontSize,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Plus Jakarta Sans',
|
||||||
|
color: FlutterFlowTheme
|
||||||
|
.of(context)
|
||||||
|
.primaryText,
|
||||||
|
fontSize:
|
||||||
|
limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight:
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
FontWeight.w500,
|
||||||
|
useGoogleFonts:
|
||||||
|
GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
'Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder:
|
||||||
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.primaryText,
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.0),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder:
|
||||||
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).success,
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.success,
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.0),
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder:
|
||||||
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.error,
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.0),
|
||||||
),
|
),
|
||||||
errorStyle: TextStyle(
|
errorStyle: TextStyle(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily:
|
||||||
color: FlutterFlowTheme.of(context).error,
|
'Plus Jakarta Sans',
|
||||||
fontSize: limitedInputFontSize,
|
color:
|
||||||
fontWeight: FontWeight.w400,
|
FlutterFlowTheme.of(
|
||||||
fontStyle: FontStyle.normal,
|
context)
|
||||||
|
.error,
|
||||||
|
fontSize:
|
||||||
|
limitedInputFontSize,
|
||||||
|
fontWeight:
|
||||||
|
FontWeight.w400,
|
||||||
|
fontStyle:
|
||||||
|
FontStyle.normal,
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder:
|
||||||
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.error,
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.0),
|
||||||
),
|
),
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
fillColor:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.primaryBackground,
|
||||||
suffixIcon: Icon(
|
suffixIcon: Icon(
|
||||||
Icons.email,
|
Icons.email,
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.accent1,
|
||||||
size: 22.0,
|
size: 22.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
style: FlutterFlowTheme.of(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
context)
|
||||||
color: FlutterFlowTheme.of(context).customColor1,
|
.bodyLarge
|
||||||
fontSize: limitedInputFontSize,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Plus Jakarta Sans',
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.customColor1,
|
||||||
|
fontSize:
|
||||||
|
limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight:
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
FontWeight.w500,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
'Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType
|
||||||
validator: _model.emailRegisterFormTextControllerValidator.asValidator(context),
|
.emailAddress,
|
||||||
|
validator: _model
|
||||||
|
.emailRegisterFormTextControllerValidator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
key: const ValueKey<String>('passwordTextFormField'),
|
key: const ValueKey<String>(
|
||||||
controller: _model.passwordRegisterFormTextController,
|
'passwordTextFormField'),
|
||||||
focusNode: _model.passwordRegisterFormFocusNode,
|
controller: _model
|
||||||
onChanged: (_) => EasyDebounce.debounce(
|
.passwordRegisterFormTextController,
|
||||||
|
focusNode: _model
|
||||||
|
.passwordRegisterFormFocusNode,
|
||||||
|
onChanged: (_) =>
|
||||||
|
EasyDebounce.debounce(
|
||||||
'_model.passwordRegisterFormTextController',
|
'_model.passwordRegisterFormTextController',
|
||||||
const Duration(milliseconds: 500),
|
const Duration(
|
||||||
|
milliseconds: 500),
|
||||||
() => setState(() {}),
|
() => setState(() {}),
|
||||||
),
|
),
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
autofillHints: const [AutofillHints.password],
|
autofillHints: const [
|
||||||
obscureText: !_model.passwordRegisterFormVisibility,
|
AutofillHints.password
|
||||||
|
],
|
||||||
|
obscureText: !_model
|
||||||
|
.passwordRegisterFormVisibility,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText:
|
||||||
|
FFLocalizations.of(
|
||||||
|
context)
|
||||||
|
.getText(
|
||||||
'0firji8l' /* Senha */,
|
'0firji8l' /* Senha */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
labelStyle: FlutterFlowTheme
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
.of(context)
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.labelLarge
|
||||||
fontSize: limitedInputFontSize,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Plus Jakarta Sans',
|
||||||
|
color: FlutterFlowTheme
|
||||||
|
.of(context)
|
||||||
|
.primaryText,
|
||||||
|
fontSize:
|
||||||
|
limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight:
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
FontWeight.w500,
|
||||||
|
useGoogleFonts:
|
||||||
|
GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
'Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder:
|
||||||
|
OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).customColor1,
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.customColor1,
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.0),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder:
|
||||||
borderSide: const BorderSide(
|
OutlineInputBorder(
|
||||||
color: Color(0xFF1AAB5F),
|
borderSide:
|
||||||
|
const BorderSide(
|
||||||
|
color:
|
||||||
|
Color(0xFF1AAB5F),
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.0),
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder:
|
||||||
borderSide: const BorderSide(
|
OutlineInputBorder(
|
||||||
color: Color(0xFFFF5963),
|
borderSide:
|
||||||
|
const BorderSide(
|
||||||
|
color:
|
||||||
|
Color(0xFFFF5963),
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.0),
|
||||||
),
|
),
|
||||||
errorStyle: TextStyle(
|
errorStyle: TextStyle(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily:
|
||||||
color: FlutterFlowTheme.of(context).error,
|
'Plus Jakarta Sans',
|
||||||
fontSize: limitedInputFontSize,
|
color:
|
||||||
fontWeight: FontWeight.w400,
|
FlutterFlowTheme.of(
|
||||||
fontStyle: FontStyle.normal,
|
context)
|
||||||
|
.error,
|
||||||
|
fontSize:
|
||||||
|
limitedInputFontSize,
|
||||||
|
fontWeight:
|
||||||
|
FontWeight.w400,
|
||||||
|
fontStyle:
|
||||||
|
FontStyle.normal,
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder:
|
||||||
borderSide: const BorderSide(
|
OutlineInputBorder(
|
||||||
color: Color(0xFFFF5963),
|
borderSide:
|
||||||
|
const BorderSide(
|
||||||
|
color:
|
||||||
|
Color(0xFFFF5963),
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.0),
|
||||||
),
|
),
|
||||||
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,
|
||||||
),
|
),
|
||||||
focusNode: FocusNode(skipTraversal: true),
|
focusNode: FocusNode(
|
||||||
|
skipTraversal: true),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
_model.passwordRegisterFormVisibility ? Icons.visibility_outlined : Icons.visibility_off_outlined,
|
_model.passwordRegisterFormVisibility
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
? Icons
|
||||||
|
.visibility_outlined
|
||||||
|
: Icons
|
||||||
|
.visibility_off_outlined,
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.accent1,
|
||||||
size: 24.0,
|
size: 24.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
style: FlutterFlowTheme.of(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
context)
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.bodyLarge
|
||||||
fontSize: limitedInputFontSize,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Plus Jakarta Sans',
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.primaryText,
|
||||||
|
fontSize:
|
||||||
|
limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight:
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
FontWeight.w500,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
'Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
validator: _model.passwordRegisterFormTextControllerValidator.asValidator(context),
|
validator: _model
|
||||||
|
.passwordRegisterFormTextControllerValidator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -475,53 +728,86 @@ 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 {
|
||||||
var shouldSetState = false;
|
var shouldSetState = false;
|
||||||
_model.register = await AuthenticationService.signUp(
|
_model.register =
|
||||||
|
await AuthenticationService
|
||||||
|
.signUp(
|
||||||
context,
|
context,
|
||||||
email: _model.emailRegisterFormTextController.text,
|
email: _model
|
||||||
name: _model.nameRegisterFormTextController.text,
|
.emailRegisterFormTextController
|
||||||
passwd: _model.passwordRegisterFormTextController.text,
|
.text,
|
||||||
|
name: _model
|
||||||
|
.nameRegisterFormTextController
|
||||||
|
.text,
|
||||||
|
passwd: _model
|
||||||
|
.passwordRegisterFormTextController
|
||||||
|
.text,
|
||||||
device: _deviceType,
|
device: _deviceType,
|
||||||
);
|
);
|
||||||
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 */,
|
||||||
),
|
),
|
||||||
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).accent1,
|
iconPadding:
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
const EdgeInsetsDirectional
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
.fromSTEB(
|
||||||
color: FlutterFlowTheme.of(context).secondaryText,
|
0.0, 0.0, 0.0, 0.0),
|
||||||
fontSize: limitedInputFontSize,
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.accent1,
|
||||||
|
textStyle: FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.titleSmall
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Plus Jakarta Sans',
|
||||||
|
color: FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.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'),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
BorderRadius.circular(12.0),
|
||||||
|
disabledColor:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.customColor5,
|
||||||
disabledTextColor: Colors.white,
|
disabledTextColor: Colors.white,
|
||||||
),
|
),
|
||||||
showLoadingIndicator: true,
|
showLoadingIndicator: true,
|
||||||
|
@ -530,46 +816,81 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
|
|
||||||
// You will have to add an action on this rich text to go to your login page.
|
// You will have to add an action on this rich text to go to your login page.
|
||||||
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(
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: FFLocalizations.of(context).getText(
|
text: FFLocalizations.of(
|
||||||
|
context)
|
||||||
|
.getText(
|
||||||
'a9smhn5b' /* Você já tem uma conta? */,
|
'a9smhn5b' /* Você já tem uma conta? */,
|
||||||
),
|
),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(
|
||||||
fontSize: limitedInputFontSize,
|
context)
|
||||||
|
.primaryText,
|
||||||
|
fontSize:
|
||||||
|
limitedInputFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: FFLocalizations.of(context).getText(
|
text: FFLocalizations.of(
|
||||||
|
context)
|
||||||
|
.getText(
|
||||||
'09xv5ctc' /* Clique aqui */,
|
'09xv5ctc' /* Clique aqui */,
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
context)
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
.bodyMedium
|
||||||
fontSize: limitedInputFontSize,
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Plus Jakarta Sans',
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.primary,
|
||||||
|
fontSize:
|
||||||
|
limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight:
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
FontWeight.w600,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
'Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style:
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
FlutterFlowTheme.of(context)
|
||||||
letterSpacing: 0.0,
|
.bodyMedium
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.override(
|
||||||
),
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -579,7 +900,8 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
).animateOnPageLoad(animationsMap['containerOnPageLoadAnimation']!),
|
).animateOnPageLoad(
|
||||||
|
animationsMap['containerOnPageLoadAnimation']!),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -37,8 +37,10 @@ class ViewVisitDetailModel extends FlutterFlowModel<ViewVisitDetailWidget> {
|
||||||
|
|
||||||
Future<void> initializeDatabase() async {
|
Future<void> initializeDatabase() async {
|
||||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
userUUID =
|
||||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,19 +85,23 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
_model.textController1 = TextEditingController(text: widget.visitTempStr == 'null' ? '' : widget.visitTempStr ?? '');
|
_model.textController1 = TextEditingController(
|
||||||
|
text: widget.visitTempStr == 'null' ? '' : widget.visitTempStr ?? '');
|
||||||
_model.textFieldFocusNode1 ??= FocusNode();
|
_model.textFieldFocusNode1 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController2 ??= TextEditingController(text: widget.visitStartDate);
|
_model.textController2 ??=
|
||||||
|
TextEditingController(text: widget.visitStartDate);
|
||||||
_model.textFieldFocusNode2 ??= FocusNode();
|
_model.textFieldFocusNode2 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController3 ??= TextEditingController(text: widget.visitEndDate);
|
_model.textController3 ??= TextEditingController(text: widget.visitEndDate);
|
||||||
_model.textFieldFocusNode3 ??= FocusNode();
|
_model.textFieldFocusNode3 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController4 ??= TextEditingController(text: widget.visitReasonStr);
|
_model.textController4 ??=
|
||||||
|
TextEditingController(text: widget.visitReasonStr);
|
||||||
_model.textFieldFocusNode4 ??= FocusNode();
|
_model.textFieldFocusNode4 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController5 ??= TextEditingController(text: widget.visitLevelStr);
|
_model.textController5 ??=
|
||||||
|
TextEditingController(text: widget.visitLevelStr);
|
||||||
_model.textFieldFocusNode5 ??= FocusNode();
|
_model.textFieldFocusNode5 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController6 ??= TextEditingController(text: widget.visitObsStr);
|
_model.textController6 ??= TextEditingController(text: widget.visitObsStr);
|
||||||
|
@ -113,7 +117,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var filteredVisitorJsonList = findVisitorById(widget.visitorJsonList, widget.visitIdStr) ?? 'null';
|
var filteredVisitorJsonList =
|
||||||
|
findVisitorById(widget.visitorJsonList, widget.visitIdStr) ?? 'null';
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 200.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 200.0, 0.0, 0.0),
|
||||||
|
@ -149,7 +154,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: const AlignmentDirectional(1.0, 0.0),
|
alignment: const AlignmentDirectional(1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(15.0, 0.0, 15.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
15.0, 0.0, 15.0, 0.0),
|
||||||
child: FlutterFlowIconButton(
|
child: FlutterFlowIconButton(
|
||||||
borderRadius: 20.0,
|
borderRadius: 20.0,
|
||||||
borderWidth: 1.0,
|
borderWidth: 1.0,
|
||||||
|
@ -178,7 +184,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 20.0, 20.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 0.0, 20.0, 20.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
|
@ -218,8 +225,10 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(100.0),
|
borderRadius: BorderRadius.circular(100.0),
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
fadeInDuration: const Duration(milliseconds: 500),
|
fadeInDuration:
|
||||||
fadeOutDuration: const Duration(milliseconds: 500),
|
const Duration(milliseconds: 500),
|
||||||
|
fadeOutDuration:
|
||||||
|
const Duration(milliseconds: 500),
|
||||||
imageUrl: valueOrDefault<String>(
|
imageUrl: valueOrDefault<String>(
|
||||||
widget.visitorImgPath,
|
widget.visitorImgPath,
|
||||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||||
|
@ -238,7 +247,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
Container(
|
Container(
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 10.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 8.0, 10.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController1,
|
controller: _model.textController1,
|
||||||
focusNode: _model.textFieldFocusNode1,
|
focusNode: _model.textFieldFocusNode1,
|
||||||
|
@ -252,17 +262,27 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'9yu35pzg' /* Encerramento da Visita */,
|
'9yu35pzg' /* Encerramento da Visita */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.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(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.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(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -294,23 +314,29 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
),
|
),
|
||||||
validator: _model.textController1Validator.asValidator(context),
|
validator: _model.textController1Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 0.0, 0.0, 10.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 8.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController2,
|
controller: _model.textController2,
|
||||||
focusNode: _model.textFieldFocusNode2,
|
focusNode: _model.textFieldFocusNode2,
|
||||||
|
@ -324,20 +350,34 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'aj6scczp' /* Início */,
|
'aj6scczp' /* Início */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText: FFLocalizations.of(context).getText(
|
||||||
'ub084nhy' /* dd/mm/yyyy */,
|
'ub084nhy' /* dd/mm/yyyy */,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -368,19 +408,27 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
validator: _model.textController2Validator.asValidator(context),
|
validator: _model.textController2Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 8.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController3,
|
controller: _model.textController3,
|
||||||
focusNode: _model.textFieldFocusNode3,
|
focusNode: _model.textFieldFocusNode3,
|
||||||
|
@ -394,20 +442,34 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'rvi5z7wg' /* Término */,
|
'rvi5z7wg' /* Término */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText: FFLocalizations.of(context).getText(
|
||||||
'ixs67mrz' /* dd/mm/yyyy */,
|
'ixs67mrz' /* dd/mm/yyyy */,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -438,13 +500,20 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
validator: _model.textController3Validator.asValidator(context),
|
validator: _model.textController3Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -452,14 +521,16 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 0.0, 0.0, 10.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 8.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController4,
|
controller: _model.textController4,
|
||||||
focusNode: _model.textFieldFocusNode4,
|
focusNode: _model.textFieldFocusNode4,
|
||||||
|
@ -473,20 +544,34 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'yxilg7ek' /* Motivo da Visita */,
|
'yxilg7ek' /* Motivo da Visita */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText: FFLocalizations.of(context).getText(
|
||||||
'ypeydbem' /* Motivo */,
|
'ypeydbem' /* Motivo */,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -517,19 +602,27 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
validator: _model.textController4Validator.asValidator(context),
|
validator: _model.textController4Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 8.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController5,
|
controller: _model.textController5,
|
||||||
focusNode: _model.textFieldFocusNode5,
|
focusNode: _model.textFieldFocusNode5,
|
||||||
|
@ -543,20 +636,34 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'dgr3pk3a' /* Nível de Acesso */,
|
'dgr3pk3a' /* Nível de Acesso */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText: FFLocalizations.of(context).getText(
|
||||||
'rs3d4gb8' /* Nível de Acesso */,
|
'rs3d4gb8' /* Nível de Acesso */,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.labelMedium
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -587,13 +694,20 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
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),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
validator: _model.textController5Validator.asValidator(context),
|
validator: _model.textController5Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -603,7 +717,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
Container(
|
Container(
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 0.0, 8.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController6,
|
controller: _model.textController6,
|
||||||
focusNode: _model.textFieldFocusNode6,
|
focusNode: _model.textFieldFocusNode6,
|
||||||
|
@ -617,17 +732,27 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'lppn9rxa' /* Observações da Visita */,
|
'lppn9rxa' /* Observações da Visita */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.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(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
.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(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -659,11 +784,15 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
),
|
),
|
||||||
validator: _model.textController6Validator.asValidator(context),
|
validator: _model.textController6Validator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -688,7 +817,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
size: 24.0,
|
size: 24.0,
|
||||||
),
|
),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
_model.deleteVisit = await PhpGroup.deleteVisitCall.call(
|
_model.deleteVisit =
|
||||||
|
await PhpGroup.deleteVisitCall.call(
|
||||||
idVisita: widget.visitIdStr,
|
idVisita: widget.visitIdStr,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -698,7 +828,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
false) {
|
false) {
|
||||||
context.pop();
|
context.pop();
|
||||||
} else {
|
} else {
|
||||||
final error = await DialogUtil.errorDefault(context);
|
final error =
|
||||||
|
await DialogUtil.errorDefault(context);
|
||||||
await showModalBottomSheet(
|
await showModalBottomSheet(
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
|
@ -735,7 +866,10 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
} else if ((widget.visitStatusStr == 'C') || (widget.visitStatusStr == 'F') || (widget.visitStatusStr == 'B') || (widget.visitStatusStr == 'I')) {
|
} else if ((widget.visitStatusStr == 'C') ||
|
||||||
|
(widget.visitStatusStr == 'F') ||
|
||||||
|
(widget.visitStatusStr == 'B') ||
|
||||||
|
(widget.visitStatusStr == 'I')) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
|
|
@ -5,7 +5,8 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class VisitDetailsModalTemplateComponentModel extends FlutterFlowModel<VisitDetailsModalTemplateComponentWidget> {
|
class VisitDetailsModalTemplateComponentModel
|
||||||
|
extends FlutterFlowModel<VisitDetailsModalTemplateComponentWidget> {
|
||||||
/// Local state fields for this component.
|
/// Local state fields for this component.
|
||||||
|
|
||||||
Color statusColor = const Color(0xff000000);
|
Color statusColor = const Color(0xff000000);
|
||||||
|
@ -20,7 +21,8 @@ class VisitDetailsModalTemplateComponentModel extends FlutterFlowModel<VisitDeta
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {
|
void initState(BuildContext context) {
|
||||||
viewVisitDetailModel = createModel(context, () => ViewVisitDetailModel());
|
viewVisitDetailModel = createModel(context, () => ViewVisitDetailModel());
|
||||||
scheduleVisitDetailModel = createModel(context, () => ScheduleVisitDetailModel());
|
scheduleVisitDetailModel =
|
||||||
|
createModel(context, () => ScheduleVisitDetailModel());
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -41,10 +41,12 @@ class VisitDetailsModalTemplateComponentWidget extends StatefulWidget {
|
||||||
final Color? visitStatusColor;
|
final Color? visitStatusColor;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<VisitDetailsModalTemplateComponentWidget> createState() => _VisitDetailsModalTemplateComponentWidgetState();
|
State<VisitDetailsModalTemplateComponentWidget> createState() =>
|
||||||
|
_VisitDetailsModalTemplateComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _VisitDetailsModalTemplateComponentWidgetState extends State<VisitDetailsModalTemplateComponentWidget> {
|
class _VisitDetailsModalTemplateComponentWidgetState
|
||||||
|
extends State<VisitDetailsModalTemplateComponentWidget> {
|
||||||
late VisitDetailsModalTemplateComponentModel _model;
|
late VisitDetailsModalTemplateComponentModel _model;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -56,7 +58,8 @@ class _VisitDetailsModalTemplateComponentWidgetState extends State<VisitDetailsM
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(context, () => VisitDetailsModalTemplateComponentModel());
|
_model =
|
||||||
|
createModel(context, () => VisitDetailsModalTemplateComponentModel());
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'visitor_details_modal_template_component_widget.dart' show VisitorDetailsModalTemplateComponentWidget;
|
import 'visitor_details_modal_template_component_widget.dart'
|
||||||
|
show VisitorDetailsModalTemplateComponentWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class VisitorDetailsModalTemplateComponentModel extends FlutterFlowModel<VisitorDetailsModalTemplateComponentWidget> {
|
class VisitorDetailsModalTemplateComponentModel
|
||||||
|
extends FlutterFlowModel<VisitorDetailsModalTemplateComponentWidget> {
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,12 @@ class VisitorDetailsModalTemplateComponentWidget extends StatefulWidget {
|
||||||
final String? visitorEmail;
|
final String? visitorEmail;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<VisitorDetailsModalTemplateComponentWidget> createState() => _VisitorDetailsModalTemplateComponentWidgetState();
|
State<VisitorDetailsModalTemplateComponentWidget> createState() =>
|
||||||
|
_VisitorDetailsModalTemplateComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _VisitorDetailsModalTemplateComponentWidgetState extends State<VisitorDetailsModalTemplateComponentWidget> {
|
class _VisitorDetailsModalTemplateComponentWidgetState
|
||||||
|
extends State<VisitorDetailsModalTemplateComponentWidget> {
|
||||||
late VisitorDetailsModalTemplateComponentModel _model;
|
late VisitorDetailsModalTemplateComponentModel _model;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -40,7 +42,8 @@ class _VisitorDetailsModalTemplateComponentWidgetState extends State<VisitorDeta
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(context, () => VisitorDetailsModalTemplateComponentModel());
|
_model =
|
||||||
|
createModel(context, () => VisitorDetailsModalTemplateComponentModel());
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -82,7 +85,8 @@ class _VisitorDetailsModalTemplateComponentWidgetState extends State<VisitorDeta
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 5.0, 15.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
10.0, 5.0, 15.0, 0.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -103,18 +107,21 @@ class _VisitorDetailsModalTemplateComponentWidgetState extends State<VisitorDeta
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(20.0, 40.0, 20.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
20.0, 40.0, 20.0, 0.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
shape: BoxShape.rectangle,
|
shape: BoxShape.rectangle,
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: 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: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
if (widget.visitorImageURL != '' && widget.visitorImageURL != null)
|
if (widget.visitorImageURL != '' &&
|
||||||
|
widget.visitorImageURL != null)
|
||||||
Container(
|
Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
height: 100.0,
|
height: 100.0,
|
||||||
|
@ -130,17 +137,23 @@ class _VisitorDetailsModalTemplateComponentWidgetState extends State<VisitorDeta
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(20.0, 0.0, 20.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
20.0, 0.0, 20.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.visitorName ?? '',
|
widget.visitorName ?? '',
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
fontSize: 24.0,
|
fontSize: 24.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -148,18 +161,24 @@ class _VisitorDetailsModalTemplateComponentWidgetState extends State<VisitorDeta
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(20.0, 0.0, 20.0, 30.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
20.0, 0.0, 20.0, 30.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'hz7ivuqn' /* Tipo de Visitante */,
|
'hz7ivuqn' /* Tipo de Visitante */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -173,20 +192,28 @@ class _VisitorDetailsModalTemplateComponentWidgetState extends State<VisitorDeta
|
||||||
size: 24.0,
|
size: 24.0,
|
||||||
),
|
),
|
||||||
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, 20.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
20.0, 0.0, 20.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'rwqn0det' /* (00) 0 0000-0000 */,
|
'rwqn0det' /* (00) 0 0000-0000 */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -202,20 +229,28 @@ class _VisitorDetailsModalTemplateComponentWidgetState extends State<VisitorDeta
|
||||||
size: 24.0,
|
size: 24.0,
|
||||||
),
|
),
|
||||||
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, 20.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
20.0, 0.0, 20.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'0wqbiekp' /* email@provider.etc */,
|
'0wqbiekp' /* email@provider.etc */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -4,7 +4,8 @@ import 'package:hub/features/backend/index.dart';
|
||||||
import 'package:hub/features/storage/index.dart';
|
import 'package:hub/features/storage/index.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
|
|
||||||
class VisitorSearchModalTemplateComponentModel extends FlutterFlowModel<VisitorSearchModalTemplateComponentWidget> {
|
class VisitorSearchModalTemplateComponentModel
|
||||||
|
extends FlutterFlowModel<VisitorSearchModalTemplateComponentWidget> {
|
||||||
late final String devUUID;
|
late final String devUUID;
|
||||||
late final String userUUID;
|
late final String userUUID;
|
||||||
late final String cliUUID;
|
late final String cliUUID;
|
||||||
|
@ -13,15 +14,18 @@ class VisitorSearchModalTemplateComponentModel extends FlutterFlowModel<VisitorS
|
||||||
void addToVisitors(dynamic item) => visitors.add(item);
|
void addToVisitors(dynamic item) => visitors.add(item);
|
||||||
void removeFromVisitors(dynamic item) => visitors.remove(item);
|
void removeFromVisitors(dynamic item) => visitors.remove(item);
|
||||||
void removeAtIndexFromVisitors(int index) => visitors.removeAt(index);
|
void removeAtIndexFromVisitors(int index) => visitors.removeAt(index);
|
||||||
void insertAtIndexInVisitors(int index, dynamic item) => visitors.insert(index, item);
|
void insertAtIndexInVisitors(int index, dynamic item) =>
|
||||||
void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) => visitors[index] = updateFn(visitors[index]);
|
visitors.insert(index, item);
|
||||||
|
void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) =>
|
||||||
|
visitors[index] = updateFn(visitors[index]);
|
||||||
|
|
||||||
List<String> docs = [];
|
List<String> docs = [];
|
||||||
void addToDocs(String item) => docs.add(item);
|
void addToDocs(String item) => docs.add(item);
|
||||||
void removeFromDocs(String item) => docs.remove(item);
|
void removeFromDocs(String item) => docs.remove(item);
|
||||||
void removeAtIndexFromDocs(int index) => docs.removeAt(index);
|
void removeAtIndexFromDocs(int index) => docs.removeAt(index);
|
||||||
void insertAtIndexInDocs(int index, String item) => docs.insert(index, item);
|
void insertAtIndexInDocs(int index, String item) => docs.insert(index, item);
|
||||||
void updateDocsAtIndex(int index, Function(String) updateFn) => docs[index] = updateFn(docs[index]);
|
void updateDocsAtIndex(int index, Function(String) updateFn) =>
|
||||||
|
docs[index] = updateFn(docs[index]);
|
||||||
|
|
||||||
FocusNode? textFieldFocusNode;
|
FocusNode? textFieldFocusNode;
|
||||||
TextEditingController? textController;
|
TextEditingController? textController;
|
||||||
|
@ -35,8 +39,10 @@ class VisitorSearchModalTemplateComponentModel extends FlutterFlowModel<VisitorS
|
||||||
|
|
||||||
Future<void> initDatabase() async {
|
Future<void> initDatabase() async {
|
||||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
userUUID =
|
||||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,13 @@ class VisitorSearchModalTemplateComponentWidget extends StatefulWidget {
|
||||||
final Future Function(List<String>? docsParam)? getDocs;
|
final Future Function(List<String>? docsParam)? getDocs;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<VisitorSearchModalTemplateComponentWidget> createState() => _VisitorSearchModalTemplateComponentWidgetState();
|
State<VisitorSearchModalTemplateComponentWidget> createState() =>
|
||||||
|
_VisitorSearchModalTemplateComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearchModalTemplateComponentWidget> with TickerProviderStateMixin {
|
class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
|
extends State<VisitorSearchModalTemplateComponentWidget>
|
||||||
|
with TickerProviderStateMixin {
|
||||||
late VisitorSearchModalTemplateComponentModel _model;
|
late VisitorSearchModalTemplateComponentModel _model;
|
||||||
|
|
||||||
safeSetState(VoidCallback callback) {
|
safeSetState(VoidCallback callback) {
|
||||||
|
@ -39,7 +42,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(context, () => VisitorSearchModalTemplateComponentModel());
|
_model =
|
||||||
|
createModel(context, () => VisitorSearchModalTemplateComponentModel());
|
||||||
|
|
||||||
_model.textController ??= TextEditingController();
|
_model.textController ??= TextEditingController();
|
||||||
_model.textFieldFocusNode ??= FocusNode();
|
_model.textFieldFocusNode ??= FocusNode();
|
||||||
|
@ -54,9 +58,12 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
final double limitedInputFontSize =
|
||||||
final double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
final double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(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),
|
||||||
|
@ -76,7 +83,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
children: [],
|
children: [],
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 25.0, 16.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(16.0, 25.0, 16.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController,
|
controller: _model.textController,
|
||||||
focusNode: _model.textFieldFocusNode,
|
focusNode: _model.textFieldFocusNode,
|
||||||
|
@ -94,45 +102,67 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
ptText: 'Documento do Visitante',
|
ptText: 'Documento do Visitante',
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: 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: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(color: FlutterFlowTheme.of(context).accent1, width: 0.5),
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).accent1, width: 0.5),
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius: const BorderRadius.only(
|
||||||
bottomLeft: Radius.circular(15.0), bottomRight: Radius.circular(15.0), topLeft: Radius.circular(15.0), topRight: Radius.circular(15.0)),
|
bottomLeft: Radius.circular(15.0),
|
||||||
|
bottomRight: Radius.circular(15.0),
|
||||||
|
topLeft: Radius.circular(15.0),
|
||||||
|
topRight: Radius.circular(15.0)),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(color: FlutterFlowTheme.of(context).primary, width: 0.5),
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).primary, width: 0.5),
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius: const BorderRadius.only(
|
||||||
bottomLeft: Radius.circular(15.0), bottomRight: Radius.circular(15.0), topLeft: Radius.circular(15.0), topRight: Radius.circular(15.0)),
|
bottomLeft: Radius.circular(15.0),
|
||||||
|
bottomRight: Radius.circular(15.0),
|
||||||
|
topLeft: Radius.circular(15.0),
|
||||||
|
topRight: Radius.circular(15.0)),
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(color: FlutterFlowTheme.of(context).error, width: 0.5),
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error, width: 0.5),
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius: const BorderRadius.only(
|
||||||
bottomLeft: Radius.circular(15.0), bottomRight: Radius.circular(15.0), topLeft: Radius.circular(15.0), topRight: Radius.circular(15.0)),
|
bottomLeft: Radius.circular(15.0),
|
||||||
|
bottomRight: Radius.circular(15.0),
|
||||||
|
topLeft: Radius.circular(15.0),
|
||||||
|
topRight: Radius.circular(15.0)),
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(color: FlutterFlowTheme.of(context).error, width: 0.5),
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error, width: 0.5),
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius: const BorderRadius.only(
|
||||||
bottomLeft: Radius.circular(15.0), bottomRight: Radius.circular(15.0), topLeft: Radius.circular(15.0), topRight: Radius.circular(15.0)),
|
bottomLeft: Radius.circular(15.0),
|
||||||
|
bottomRight: Radius.circular(15.0),
|
||||||
|
topLeft: Radius.circular(15.0),
|
||||||
|
topRight: Radius.circular(15.0)),
|
||||||
),
|
),
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
prefixIcon: Icon(Icons.search_outlined, color: FlutterFlowTheme.of(context).accent1),
|
prefixIcon: Icon(Icons.search_outlined,
|
||||||
|
color: FlutterFlowTheme.of(context).accent1),
|
||||||
),
|
),
|
||||||
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: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
keyboardType: const TextInputType.numberWithOptions(signed: true),
|
keyboardType: const TextInputType.numberWithOptions(signed: true),
|
||||||
validator: _model.textControllerValidator.asValidator(context),
|
validator: _model.textControllerValidator.asValidator(context),
|
||||||
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.allow(RegExp('[0-9]'))
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (_model.visitors.isNotEmpty && _model.visitors.isNotEmpty)
|
if (_model.visitors.isNotEmpty && _model.visitors.isNotEmpty)
|
||||||
|
@ -141,26 +171,32 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
16.0, 12.0, 0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText('9coywebh'),
|
FFLocalizations.of(context).getText('9coywebh'),
|
||||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
style: 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: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(4.0, 12.0, 16.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
4.0, 12.0, 16.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
_model.visitors.length.toString(),
|
_model.visitors.length.toString(),
|
||||||
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: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -172,7 +208,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if (_model.visitors.isNotEmpty) {
|
if (_model.visitors.isNotEmpty) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 8.0, 8.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
8.0, 8.0, 8.0, 0.0),
|
||||||
child: Builder(
|
child: Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
final visitor = _model.visitors.map((e) => e).toList();
|
final visitor = _model.visitors.map((e) => e).toList();
|
||||||
|
@ -185,7 +222,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
final visitorItem = visitor[visitorIndex];
|
final visitorItem = visitor[visitorIndex];
|
||||||
final docItem = doc[visitorIndex];
|
final docItem = doc[visitorIndex];
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 1.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 0.0, 0.0, 1.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -194,19 +232,24 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground,
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
ClipRRect(
|
ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(40.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(40.0),
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
fadeInDuration: const Duration(milliseconds: 500),
|
fadeInDuration: const Duration(
|
||||||
fadeOutDuration: const Duration(milliseconds: 500),
|
milliseconds: 500),
|
||||||
|
fadeOutDuration: const Duration(
|
||||||
|
milliseconds: 500),
|
||||||
imageUrl:
|
imageUrl:
|
||||||
"https://freaccess.com.br/freaccess/getImage.php?devUUID=${_model.devUUID}&userUUID=${_model.userUUID}&cliID=${_model.cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
"https://freaccess.com.br/freaccess/getImage.php?devUUID=${_model.devUUID}&userUUID=${_model.userUUID}&cliID=${_model.cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||||
visitorItem,
|
visitorItem,
|
||||||
|
@ -220,21 +263,40 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment:
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional
|
||||||
|
.fromSTEB(
|
||||||
|
12.0, 0.0, 0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
valueOrDefault<String>(
|
valueOrDefault<String>(
|
||||||
getJsonField(visitorItem, r'''$.VTE_NOME''')?.toString(),
|
getJsonField(visitorItem,
|
||||||
|
r'''$.VTE_NOME''')
|
||||||
|
?.toString(),
|
||||||
'NOT FOUND',
|
'NOT FOUND',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
style: FlutterFlowTheme.of(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyLargeFamily,
|
context)
|
||||||
|
.bodyLarge
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyLargeFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyLargeFamily),
|
useGoogleFonts: GoogleFonts
|
||||||
fontSize: limitedBodyFontSize,
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyLargeFamily),
|
||||||
|
fontSize:
|
||||||
|
limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -245,9 +307,14 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
borderRadius: 20.0,
|
borderRadius: 20.0,
|
||||||
borderWidth: 1.0,
|
borderWidth: 1.0,
|
||||||
buttonSize: 40.0,
|
buttonSize: 40.0,
|
||||||
icon: Icon(Icons.close, color: FlutterFlowTheme.of(context).customColor6, size: 20.0),
|
icon: Icon(Icons.close,
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.customColor6,
|
||||||
|
size: 20.0),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
_model.removeFromVisitors(visitorItem);
|
_model.removeFromVisitors(
|
||||||
|
visitorItem);
|
||||||
_model.removeFromDocs(docItem);
|
_model.removeFromDocs(docItem);
|
||||||
safeSetState(() {});
|
safeSetState(() {});
|
||||||
},
|
},
|
||||||
|
@ -267,7 +334,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
return Container(
|
return Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
height: 100.0,
|
height: 100.0,
|
||||||
decoration: BoxDecoration(color: FlutterFlowTheme.of(context).primaryBackground),
|
decoration: BoxDecoration(
|
||||||
|
color: FlutterFlowTheme.of(context).primaryBackground),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -279,7 +347,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
children: [
|
children: [
|
||||||
FFButtonWidget(
|
FFButtonWidget(
|
||||||
onPressed: MediaQuery.of(context).viewInsets.bottom > 0
|
onPressed: MediaQuery.of(context).viewInsets.bottom > 0
|
||||||
? () async => await addVisitor(context).whenComplete(safeSetState(() {}))
|
? () async => await addVisitor(context)
|
||||||
|
.whenComplete(safeSetState(() {}))
|
||||||
: () async => await sendVisitors(context),
|
: () async => await sendVisitors(context),
|
||||||
text: MediaQuery.of(context).viewInsets.bottom > 0
|
text: MediaQuery.of(context).viewInsets.bottom > 0
|
||||||
? FFLocalizations.of(context).getVariableText(
|
? FFLocalizations.of(context).getVariableText(
|
||||||
|
@ -293,20 +362,28 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: MediaQuery.of(context).size.width * 0.4,
|
width: MediaQuery.of(context).size.width * 0.4,
|
||||||
height: 40,
|
height: 40,
|
||||||
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,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
borderSide:
|
||||||
borderRadius:
|
const BorderSide(color: Colors.transparent, width: 1.0),
|
||||||
const BorderRadius.only(bottomLeft: Radius.circular(15), bottomRight: Radius.circular(15), topLeft: Radius.circular(15), topRight: Radius.circular(15)),
|
borderRadius: const BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(15),
|
||||||
|
bottomRight: Radius.circular(15),
|
||||||
|
topLeft: Radius.circular(15),
|
||||||
|
topRight: Radius.circular(15)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -326,23 +403,36 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
Future<void> addVisitor(BuildContext context) async {
|
Future<void> addVisitor(BuildContext context) async {
|
||||||
safeSetState(() {
|
safeSetState(() {
|
||||||
_model.textController?.text = _model.textController.text;
|
_model.textController?.text = _model.textController.text;
|
||||||
_model.textController?.selection = TextSelection.collapsed(offset: _model.textController!.text.length);
|
_model.textController?.selection =
|
||||||
|
TextSelection.collapsed(offset: _model.textController!.text.length);
|
||||||
});
|
});
|
||||||
_model.getVisitorByDoc = await PhpGroup.getVisitorByDocCall.call(documento: _model.textController.text.replaceFirst(RegExp(r'^0+'), ''));
|
_model.getVisitorByDoc = await PhpGroup.getVisitorByDocCall.call(
|
||||||
|
documento: _model.textController.text.replaceFirst(RegExp(r'^0+'), ''));
|
||||||
|
|
||||||
if (PhpGroup.getVisitorByDocCall.vistanteId((_model.getVisitorByDoc?.jsonBody ?? '')) != '0' &&
|
if (PhpGroup.getVisitorByDocCall
|
||||||
PhpGroup.getVisitorByDocCall.error((_model.getVisitorByDoc?.jsonBody ?? '')) == false &&
|
.vistanteId((_model.getVisitorByDoc?.jsonBody ?? '')) !=
|
||||||
PhpGroup.getVisitorByDocCall.vistanteId((_model.getVisitorByDoc?.jsonBody ?? '')) != null) {
|
'0' &&
|
||||||
String newDoc = _model.textController.text.replaceFirst(RegExp(r'^0+'), '');
|
PhpGroup.getVisitorByDocCall
|
||||||
|
.error((_model.getVisitorByDoc?.jsonBody ?? '')) ==
|
||||||
|
false &&
|
||||||
|
PhpGroup.getVisitorByDocCall
|
||||||
|
.vistanteId((_model.getVisitorByDoc?.jsonBody ?? '')) !=
|
||||||
|
null) {
|
||||||
|
String newDoc =
|
||||||
|
_model.textController.text.replaceFirst(RegExp(r'^0+'), '');
|
||||||
bool existDoc = _model.docs.contains(newDoc);
|
bool existDoc = _model.docs.contains(newDoc);
|
||||||
if (existDoc == false) {
|
if (existDoc == false) {
|
||||||
_model.addToVisitors(PhpGroup.getVisitorByDocCall.visitante((_model.getVisitorByDoc?.jsonBody ?? '')));
|
_model.addToVisitors(PhpGroup.getVisitorByDocCall
|
||||||
|
.visitante((_model.getVisitorByDoc?.jsonBody ?? '')));
|
||||||
safeSetState(() {});
|
safeSetState(() {});
|
||||||
_model.addToDocs(_model.textController.text.replaceFirst(RegExp(r'^0+'), ''));
|
_model.addToDocs(
|
||||||
|
_model.textController.text.replaceFirst(RegExp(r'^0+'), ''));
|
||||||
safeSetState(() {});
|
safeSetState(() {});
|
||||||
} else if (existDoc == true) {
|
} else if (existDoc == true) {
|
||||||
ToastUtil.showToast(
|
ToastUtil.showToast(
|
||||||
message: FFLocalizations.of(context).getVariableText(ptText: 'Visitante já adicionado!', enText: 'Visitor already added!'),
|
message: FFLocalizations.of(context).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));
|
fontSize: LimitedFontSizeUtil.getBodyFontSize(context));
|
||||||
|
@ -353,7 +443,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return Dialog(
|
return Dialog(
|
||||||
child: VisitorNotFoundComponentWidget(doc: _model.textController.text),
|
child:
|
||||||
|
VisitorNotFoundComponentWidget(doc: _model.textController.text),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
).then((value) => safeSetState(() {
|
).then((value) => safeSetState(() {
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'welcome_template_component_widget.dart' show WelcomeTemplateComponentWidget;
|
import 'welcome_template_component_widget.dart'
|
||||||
|
show WelcomeTemplateComponentWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class WelcomeTemplateComponentModel extends FlutterFlowModel<WelcomeTemplateComponentWidget> {
|
class WelcomeTemplateComponentModel
|
||||||
|
extends FlutterFlowModel<WelcomeTemplateComponentWidget> {
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,13 @@ class WelcomeTemplateComponentWidget extends StatefulWidget {
|
||||||
final Future Function()? toggleSignInPage;
|
final Future Function()? toggleSignInPage;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
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>{};
|
||||||
|
|
||||||
|
@ -87,8 +90,10 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
double limitedHeaderFontSize =
|
||||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
|
double limitedSubHeaderFontSize =
|
||||||
|
LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
|
|
||||||
return Align(
|
return Align(
|
||||||
|
@ -104,7 +109,8 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
FFLocalizations.of(context).getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
|
FFLocalizations.of(context)
|
||||||
|
.getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
|
@ -112,13 +118,15 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
fontSize: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
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'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText('5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
|
FFLocalizations.of(context).getText(
|
||||||
|
'5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
|
@ -126,7 +134,8 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
fontSize: limitedSubHeaderFontSize,
|
fontSize: limitedSubHeaderFontSize,
|
||||||
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'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -141,7 +150,8 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
child: const AtomImageSvgTheme(filename: 'welcome', width: 600, height: double.infinity),
|
child: const AtomImageSvgTheme(
|
||||||
|
filename: 'welcome', width: 600, height: double.infinity),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -175,72 +185,109 @@ 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();
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context).getText('dynet730' /* Entrar */),
|
text: FFLocalizations.of(context)
|
||||||
|
.getText('dynet730' /* Entrar */),
|
||||||
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: limitedInputFontSize,
|
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(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
showLoadingIndicator: false,
|
showLoadingIndicator: false,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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>('toggleSignUpPage'),
|
key: const ValueKey<String>(
|
||||||
|
'toggleSignUpPage'),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.toggleSignUpPage?.call();
|
await widget.toggleSignUpPage?.call();
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context).getText(
|
text:
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
'hha60cg7' /* Cadastrar */,
|
'hha60cg7' /* Cadastrar */,
|
||||||
),
|
),
|
||||||
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).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: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground,
|
||||||
fontSize: limitedInputFontSize,
|
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(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
showLoadingIndicator: false,
|
showLoadingIndicator: false,
|
||||||
),
|
),
|
||||||
|
@ -250,39 +297,59 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
} else {
|
} else {
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
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 */,
|
||||||
),
|
),
|
||||||
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
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
.fromSTEB(
|
||||||
color: FlutterFlowTheme.of(context).info,
|
0.0, 0.0, 0.0, 0.0),
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primary,
|
||||||
|
textStyle: FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.titleSmall
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Plus Jakarta Sans',
|
||||||
|
color: FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.info,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
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(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
showLoadingIndicator: false,
|
showLoadingIndicator: false,
|
||||||
),
|
),
|
||||||
|
@ -290,35 +357,54 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
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();
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context).getText(
|
text: FFLocalizations.of(context)
|
||||||
|
.getText(
|
||||||
'o6zob50a' /* Cadastrar */,
|
'o6zob50a' /* Cadastrar */,
|
||||||
),
|
),
|
||||||
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
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
.fromSTEB(
|
||||||
color: FlutterFlowTheme.of(context).info,
|
0.0, 0.0, 0.0, 0.0),
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primary,
|
||||||
|
textStyle: FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.titleSmall
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Plus Jakarta Sans',
|
||||||
|
color: FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.info,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
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(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius:
|
||||||
|
BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
showLoadingIndicator: false,
|
showLoadingIndicator: false,
|
||||||
),
|
),
|
||||||
|
@ -333,7 +419,8 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
).animateOnPageLoad(animationsMap['containerOnPageLoadAnimation']!),
|
).animateOnPageLoad(
|
||||||
|
animationsMap['containerOnPageLoadAnimation']!),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -32,7 +32,8 @@ class AuthenticationService {
|
||||||
context.go('/receptionPage');
|
context.go('/receptionPage');
|
||||||
} else {
|
} else {
|
||||||
await StorageHelper().set(SecureStorageKey.isLogged.value, true);
|
await StorageHelper().set(SecureStorageKey.isLogged.value, true);
|
||||||
context.go('/homePage', extra: {'update': LocalsRepositoryImpl().update});
|
context
|
||||||
|
.go('/homePage', extra: {'update': LocalsRepositoryImpl().update});
|
||||||
}
|
}
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
await DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
|
@ -50,7 +51,8 @@ class AuthenticationService {
|
||||||
final ApiCallResponse? response;
|
final ApiCallResponse? response;
|
||||||
final LoginCall callback = PhpGroup.loginCall;
|
final LoginCall callback = PhpGroup.loginCall;
|
||||||
String deviceDescription = randomString(10, 10, true, false, false);
|
String deviceDescription = randomString(10, 10, true, false, false);
|
||||||
await StorageHelper().set(SecureStorageKey.deviceDescription.value, deviceDescription);
|
await StorageHelper()
|
||||||
|
.set(SecureStorageKey.deviceDescription.value, deviceDescription);
|
||||||
|
|
||||||
final String? devUUID;
|
final String? devUUID;
|
||||||
final String userUUID;
|
final String userUUID;
|
||||||
|
@ -77,7 +79,8 @@ class AuthenticationService {
|
||||||
userName = response.jsonBody['user']['name'];
|
userName = response.jsonBody['user']['name'];
|
||||||
|
|
||||||
await StorageHelper().set(ProfileStorageKey.userUUID.key, userUUID);
|
await StorageHelper().set(ProfileStorageKey.userUUID.key, userUUID);
|
||||||
await StorageHelper().set(ProfileStorageKey.userDevUUID.key, userDevUUID);
|
await StorageHelper()
|
||||||
|
.set(ProfileStorageKey.userDevUUID.key, userDevUUID);
|
||||||
await StorageHelper().set(ProfileStorageKey.status.key, status);
|
await StorageHelper().set(ProfileStorageKey.status.key, status);
|
||||||
await StorageHelper().set(ProfileStorageKey.userName.key, userName);
|
await StorageHelper().set(ProfileStorageKey.userName.key, userName);
|
||||||
|
|
||||||
|
@ -86,14 +89,16 @@ class AuthenticationService {
|
||||||
if (response.jsonBody['error'] == null) {
|
if (response.jsonBody['error'] == null) {
|
||||||
await DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
} else {
|
} else {
|
||||||
await DialogUtil.error(context, response.jsonBody['error_msg'].toString());
|
await DialogUtil.error(
|
||||||
|
context, response.jsonBody['error_msg'].toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
await DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('login.php', emailAdress.toString(), "Login", e, s);
|
LogUtil.requestAPIFailed(
|
||||||
|
'login.php', emailAdress.toString(), "Login", e, s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +111,9 @@ class AuthenticationService {
|
||||||
}) async {
|
}) async {
|
||||||
try {
|
try {
|
||||||
ApiCallResponse? response;
|
ApiCallResponse? response;
|
||||||
if ((email != null && email != '') && (passwd != null && passwd != '' && passwd.length > 7) && (name != null && name != '')) {
|
if ((email != null && email != '') &&
|
||||||
|
(passwd != null && passwd != '' && passwd.length > 7) &&
|
||||||
|
(name != null && name != '')) {
|
||||||
response = await PhpGroup.registerCall.call(
|
response = await PhpGroup.registerCall.call(
|
||||||
name: name,
|
name: name,
|
||||||
password: passwd,
|
password: passwd,
|
||||||
|
@ -126,7 +133,8 @@ class AuthenticationService {
|
||||||
}
|
}
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
await DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('registro.php', email.toString(), "Register", e, s);
|
LogUtil.requestAPIFailed(
|
||||||
|
'registro.php', email.toString(), "Register", e, s);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,7 +162,9 @@ class AuthenticationService {
|
||||||
try {
|
try {
|
||||||
final ApiCallResponse? response;
|
final ApiCallResponse? response;
|
||||||
final ForgotPasswordCall callback = PhpGroup.forgotPasswordCall;
|
final ForgotPasswordCall callback = PhpGroup.forgotPasswordCall;
|
||||||
final String message = FFLocalizations.of(context).getVariableText(enText: "Send E-mail Successful!", ptText: "E-mail Enviado com Sucesso!");
|
final String message = FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: "Send E-mail Successful!",
|
||||||
|
ptText: "E-mail Enviado com Sucesso!");
|
||||||
|
|
||||||
response = await callback.call(email: email);
|
response = await callback.call(email: email);
|
||||||
|
|
||||||
|
@ -167,14 +177,17 @@ class AuthenticationService {
|
||||||
}
|
}
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
await DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('forgotPassword.php', email, "Forgot Password", e, s);
|
LogUtil.requestAPIFailed(
|
||||||
|
'forgotPassword.php', email, "Forgot Password", e, s);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<bool> changePassword(BuildContext context, String email, String password, String token) async {
|
static Future<bool> changePassword(
|
||||||
|
BuildContext context, String email, String password, String token) async {
|
||||||
try {
|
try {
|
||||||
final ApiCallResponse response = await PhpGroup.changePasswordCall.call(email: email, psswd: password, token: token);
|
final ApiCallResponse response = await PhpGroup.changePasswordCall
|
||||||
|
.call(email: email, psswd: password, token: token);
|
||||||
|
|
||||||
if (response.jsonBody['error'] == false) {
|
if (response.jsonBody['error'] == false) {
|
||||||
final String message = FFLocalizations.of(context).getVariableText(
|
final String message = FFLocalizations.of(context).getVariableText(
|
||||||
|
@ -190,7 +203,8 @@ class AuthenticationService {
|
||||||
}
|
}
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
await DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('changePassword.php', email, "Change Password", e, s);
|
LogUtil.requestAPIFailed(
|
||||||
|
'changePassword.php', email, "Change Password", e, s);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,17 +27,20 @@ class PhpGroup {
|
||||||
static ForgotPasswordCall forgotPasswordCall = ForgotPasswordCall();
|
static ForgotPasswordCall forgotPasswordCall = ForgotPasswordCall();
|
||||||
static ChangePasswordCall changePasswordCall = ChangePasswordCall();
|
static ChangePasswordCall changePasswordCall = ChangePasswordCall();
|
||||||
static GetLocalsCall getLocalsCall = GetLocalsCall();
|
static GetLocalsCall getLocalsCall = GetLocalsCall();
|
||||||
static PostScheduleVisitorCall postScheduleVisitorCall = PostScheduleVisitorCall();
|
static PostScheduleVisitorCall postScheduleVisitorCall =
|
||||||
|
PostScheduleVisitorCall();
|
||||||
static PostScheduleVisitCall postScheduleVisitCall = PostScheduleVisitCall();
|
static PostScheduleVisitCall postScheduleVisitCall = PostScheduleVisitCall();
|
||||||
static GetScheduleVisitCall getScheduleVisitCall = GetScheduleVisitCall();
|
static GetScheduleVisitCall getScheduleVisitCall = GetScheduleVisitCall();
|
||||||
static GetDadosCall getDadosCall = GetDadosCall();
|
static GetDadosCall getDadosCall = GetDadosCall();
|
||||||
static GetVisitorByDocCall getVisitorByDocCall = GetVisitorByDocCall();
|
static GetVisitorByDocCall getVisitorByDocCall = GetVisitorByDocCall();
|
||||||
static GetFotoVisitanteCall getFotoVisitanteCall = GetFotoVisitanteCall();
|
static GetFotoVisitanteCall getFotoVisitanteCall = GetFotoVisitanteCall();
|
||||||
static PostProvVisitSchedulingCall postProvVisitSchedulingCall = PostProvVisitSchedulingCall();
|
static PostProvVisitSchedulingCall postProvVisitSchedulingCall =
|
||||||
|
PostProvVisitSchedulingCall();
|
||||||
static GetVisitsCall getVisitsCall = GetVisitsCall();
|
static GetVisitsCall getVisitsCall = GetVisitsCall();
|
||||||
static DeleteVisitCall deleteVisitCall = DeleteVisitCall();
|
static DeleteVisitCall deleteVisitCall = DeleteVisitCall();
|
||||||
static GetPessoasLocalCall getPessoasLocalCall = GetPessoasLocalCall();
|
static GetPessoasLocalCall getPessoasLocalCall = GetPessoasLocalCall();
|
||||||
static RespondeSolicitacaoCall respondeSolicitacaoCall = RespondeSolicitacaoCall();
|
static RespondeSolicitacaoCall respondeSolicitacaoCall =
|
||||||
|
RespondeSolicitacaoCall();
|
||||||
static GetAccessCall getAccessCall = GetAccessCall();
|
static GetAccessCall getAccessCall = GetAccessCall();
|
||||||
static GetLiberationsCall getLiberationsCall = GetLiberationsCall();
|
static GetLiberationsCall getLiberationsCall = GetLiberationsCall();
|
||||||
static GetMessagesCall getMessagesCall = GetMessagesCall();
|
static GetMessagesCall getMessagesCall = GetMessagesCall();
|
||||||
|
@ -56,7 +59,8 @@ class PhpGroup {
|
||||||
static GetPetPhoto getPetPhoto = GetPetPhoto();
|
static GetPetPhoto getPetPhoto = GetPetPhoto();
|
||||||
static UnregisterDevice unregisterDevice = UnregisterDevice();
|
static UnregisterDevice unregisterDevice = UnregisterDevice();
|
||||||
static GetVehiclesByProperty getVehiclesByProperty = GetVehiclesByProperty();
|
static GetVehiclesByProperty getVehiclesByProperty = GetVehiclesByProperty();
|
||||||
static GetResidentsByProperty getResidentsByProperty = GetResidentsByProperty();
|
static GetResidentsByProperty getResidentsByProperty =
|
||||||
|
GetResidentsByProperty();
|
||||||
static GetOpenedVisits getOpenedVisits = GetOpenedVisits();
|
static GetOpenedVisits getOpenedVisits = GetOpenedVisits();
|
||||||
static GetLicense getLicense = GetLicense();
|
static GetLicense getLicense = GetLicense();
|
||||||
static GetProvSchedules getProvSchedules = GetProvSchedules();
|
static GetProvSchedules getProvSchedules = GetProvSchedules();
|
||||||
|
@ -65,9 +69,12 @@ class PhpGroup {
|
||||||
class GetProvSchedules {
|
class GetProvSchedules {
|
||||||
Future<ApiCallResponse> call(final String page, final String status) async {
|
Future<ApiCallResponse> call(final String page, final String status) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'getAgendamentoProv';
|
const String atividade = 'getAgendamentoProv';
|
||||||
const String pageSize = '10';
|
const String pageSize = '10';
|
||||||
final bool isFiltered = status != '' && status != '.*';
|
final bool isFiltered = status != '' && status != '.*';
|
||||||
|
@ -100,9 +107,12 @@ class GetProvSchedules {
|
||||||
class GetOpenedVisits {
|
class GetOpenedVisits {
|
||||||
Future<ApiCallResponse> call(final String page) async {
|
Future<ApiCallResponse> call(final String page) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'getOpenedVisits';
|
const String atividade = 'getOpenedVisits';
|
||||||
const String pageSize = '10';
|
const String pageSize = '10';
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -132,9 +142,12 @@ class GetOpenedVisits {
|
||||||
class GetResidentsByProperty {
|
class GetResidentsByProperty {
|
||||||
Future<ApiCallResponse> call(final String page) async {
|
Future<ApiCallResponse> call(final String page) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
final String devUUID = await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? '';
|
await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? '';
|
||||||
final String cliID = await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? '';
|
final String userUUID =
|
||||||
|
await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? '';
|
||||||
const String atividade = 'getResidentsByProperty';
|
const String atividade = 'getResidentsByProperty';
|
||||||
const String pageSize = '10';
|
const String pageSize = '10';
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -163,9 +176,12 @@ class GetResidentsByProperty {
|
||||||
class GetVehiclesByProperty {
|
class GetVehiclesByProperty {
|
||||||
Future<ApiCallResponse> call(final String page) async {
|
Future<ApiCallResponse> call(final String page) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'getVehiclesByProperty';
|
const String atividade = 'getVehiclesByProperty';
|
||||||
const String pageSize = '10';
|
const String pageSize = '10';
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -196,9 +212,12 @@ class GetVehiclesByProperty {
|
||||||
class GetLicense {
|
class GetLicense {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
callName: 'getLicense',
|
callName: 'getLicense',
|
||||||
|
@ -227,8 +246,10 @@ class GetLicense {
|
||||||
class UnregisterDevice {
|
class UnregisterDevice {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
callName: 'unregisterDevice',
|
callName: 'unregisterDevice',
|
||||||
|
@ -255,9 +276,12 @@ class UnregisterDevice {
|
||||||
class DeletePet {
|
class DeletePet {
|
||||||
Future<ApiCallResponse> call({final int? petID = 0}) async {
|
Future<ApiCallResponse> call({final int? petID = 0}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'excluirPet';
|
const String atividade = 'excluirPet';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -300,9 +324,12 @@ class UpdatePet {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'atualizarPet';
|
const String atividade = 'atualizarPet';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -323,7 +350,9 @@ class UpdatePet {
|
||||||
'species': species,
|
'species': species,
|
||||||
'breed': breed,
|
'breed': breed,
|
||||||
if (color != '') 'color': color,
|
if (color != '') 'color': color,
|
||||||
if (birthdayDate != '') 'birthdayDate': ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!),
|
if (birthdayDate != '')
|
||||||
|
'birthdayDate':
|
||||||
|
ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!),
|
||||||
'gender': gender,
|
'gender': gender,
|
||||||
'size': size,
|
'size': size,
|
||||||
if (notes != '') 'notes': notes,
|
if (notes != '') 'notes': notes,
|
||||||
|
@ -346,9 +375,12 @@ class GetPets {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'consultaPets';
|
const String atividade = 'consultaPets';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -380,9 +412,12 @@ class GetPetPhoto {
|
||||||
Future<ApiCallResponse> call({final int? petId}) async {
|
Future<ApiCallResponse> call({final int? petId}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'consultaFotoPet';
|
const String atividade = 'consultaFotoPet';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -423,9 +458,12 @@ class RegisterPet {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'cadastrarPet';
|
const String atividade = 'cadastrarPet';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -445,7 +483,9 @@ class RegisterPet {
|
||||||
'species': species,
|
'species': species,
|
||||||
'breed': breed,
|
'breed': breed,
|
||||||
if (color != '') 'color': color,
|
if (color != '') 'color': color,
|
||||||
if (birthdayDate != '') 'birthdayDate': ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!),
|
if (birthdayDate != '')
|
||||||
|
'birthdayDate':
|
||||||
|
ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!),
|
||||||
'gender': gender,
|
'gender': gender,
|
||||||
'size': size,
|
'size': size,
|
||||||
if (notes != '') 'notes': notes,
|
if (notes != '') 'notes': notes,
|
||||||
|
@ -468,9 +508,12 @@ class BuscaEnconcomendas {
|
||||||
final String? adresseeType,
|
final String? adresseeType,
|
||||||
final String? status,
|
final String? status,
|
||||||
}) async {
|
}) async {
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'getEncomendas';
|
const String atividade = 'getEncomendas';
|
||||||
|
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
@ -512,9 +555,12 @@ class CancelaVisita {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'cancelaVisita';
|
const String atividade = 'cancelaVisita';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -546,8 +592,10 @@ class CancelaVisita {
|
||||||
|
|
||||||
class DeleteAccount {
|
class DeleteAccount {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -578,9 +626,12 @@ class ChangePanic {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'updVisitado';
|
const String atividade = 'updVisitado';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -614,9 +665,12 @@ class ChangePass {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'updVisitado';
|
const String atividade = 'updVisitado';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -650,9 +704,12 @@ class RespondeVinculo {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
callName: 'respondeVinculo',
|
callName: 'respondeVinculo',
|
||||||
|
@ -684,9 +741,12 @@ class ChangeNotifica {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'updVisitado';
|
const String atividade = 'updVisitado';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -718,10 +778,14 @@ class UpdateIDE {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
final String newIde = (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
|
final String newIde =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? '';
|
||||||
const String atividade = 'updVisitado';
|
const String atividade = 'updVisitado';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -753,9 +817,12 @@ class UpdToken {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String token = (await StorageHelper().get(SecureStorageKey.token.value)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String token =
|
||||||
|
(await StorageHelper().get(SecureStorageKey.token.value)) ?? '';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
callName: 'updToken',
|
callName: 'updToken',
|
||||||
|
@ -782,11 +849,17 @@ class UpdToken {
|
||||||
class LoginCall {
|
class LoginCall {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String email = (await StorageHelper().get(SecureStorageKey.email.value)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String password = (await StorageHelper().get(SecureStorageKey.password.value)) ?? '';
|
final String email =
|
||||||
final String type = (await StorageHelper().get(SecureStorageKey.deviceType.value)) ?? '';
|
(await StorageHelper().get(SecureStorageKey.email.value)) ?? '';
|
||||||
final String description = (await StorageHelper().get(SecureStorageKey.deviceDescription.value)) ?? '';
|
final String password =
|
||||||
|
(await StorageHelper().get(SecureStorageKey.password.value)) ?? '';
|
||||||
|
final String type =
|
||||||
|
(await StorageHelper().get(SecureStorageKey.deviceType.value)) ?? '';
|
||||||
|
final String description =
|
||||||
|
(await StorageHelper().get(SecureStorageKey.deviceDescription.value)) ??
|
||||||
|
'';
|
||||||
late final String token;
|
late final String token;
|
||||||
try {
|
try {
|
||||||
token = await FirebaseMessagingService.getToken();
|
token = await FirebaseMessagingService.getToken();
|
||||||
|
@ -869,9 +942,12 @@ class ChangePasswordCall {
|
||||||
required final String psswd,
|
required final String psswd,
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
callName: 'changePassword',
|
callName: 'changePassword',
|
||||||
|
@ -930,8 +1006,10 @@ class GetLocalsCall {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? '';
|
await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? '';
|
||||||
|
final String userUUID =
|
||||||
|
await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? '';
|
||||||
|
|
||||||
return await ApiManager.instance
|
return await ApiManager.instance
|
||||||
.makeApiCall(
|
.makeApiCall(
|
||||||
|
@ -972,9 +1050,12 @@ class PostScheduleVisitorCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'putVisitante';
|
const String atividade = 'putVisitante';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -1027,9 +1108,12 @@ class PostScheduleVisitCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'putVisita';
|
const String atividade = 'putVisita';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -1081,9 +1165,12 @@ class GetScheduleVisitCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'getVisitas';
|
const String atividade = 'getVisitas';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -1355,9 +1442,12 @@ class GetDadosCall {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'getDados';
|
const String atividade = 'getDados';
|
||||||
|
|
||||||
return await ApiManager.instance
|
return await ApiManager.instance
|
||||||
|
@ -1393,7 +1483,8 @@ class GetDadosCall {
|
||||||
response,
|
response,
|
||||||
r'''$.error_msg''',
|
r'''$.error_msg''',
|
||||||
));
|
));
|
||||||
String? visitedDesNomeStr(dynamic response) => castToType<String>(getJsonField(
|
String? visitedDesNomeStr(dynamic response) =>
|
||||||
|
castToType<String>(getJsonField(
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.DES_NOME''',
|
r'''$.visitado.DES_NOME''',
|
||||||
));
|
));
|
||||||
|
@ -1401,27 +1492,33 @@ class GetDadosCall {
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_ID''',
|
r'''$.visitado.VDO_ID''',
|
||||||
));
|
));
|
||||||
String? visitedVDOTNomeStr(dynamic response) => castToType<String>(getJsonField(
|
String? visitedVDOTNomeStr(dynamic response) =>
|
||||||
|
castToType<String>(getJsonField(
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_NOME''',
|
r'''$.visitado.VDO_NOME''',
|
||||||
));
|
));
|
||||||
String? visitedVDOTipoStr(dynamic response) => castToType<String>(getJsonField(
|
String? visitedVDOTipoStr(dynamic response) =>
|
||||||
|
castToType<String>(getJsonField(
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_TIPO''',
|
r'''$.visitado.VDO_TIPO''',
|
||||||
));
|
));
|
||||||
String? visitedVDOImeiStr(dynamic response) => castToType<String>(getJsonField(
|
String? visitedVDOImeiStr(dynamic response) =>
|
||||||
|
castToType<String>(getJsonField(
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_IMEI''',
|
r'''$.visitado.VDO_IMEI''',
|
||||||
));
|
));
|
||||||
String? visitedVDODocumentoStr(dynamic response) => castToType<String>(getJsonField(
|
String? visitedVDODocumentoStr(dynamic response) =>
|
||||||
|
castToType<String>(getJsonField(
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_DOCUMENTO''',
|
r'''$.visitado.VDO_DOCUMENTO''',
|
||||||
));
|
));
|
||||||
String? visitedVDOEmailStr(dynamic response) => castToType<String>(getJsonField(
|
String? visitedVDOEmailStr(dynamic response) =>
|
||||||
|
castToType<String>(getJsonField(
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_EMAIL''',
|
r'''$.visitado.VDO_EMAIL''',
|
||||||
));
|
));
|
||||||
String? visitedVDOStatusWebStr(dynamic response) => castToType<String>(getJsonField(
|
String? visitedVDOStatusWebStr(dynamic response) =>
|
||||||
|
castToType<String>(getJsonField(
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_STATUSWEB''',
|
r'''$.visitado.VDO_STATUSWEB''',
|
||||||
));
|
));
|
||||||
|
@ -1469,7 +1566,8 @@ class GetDadosCall {
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.DES_ID''',
|
r'''$.visitado.DES_ID''',
|
||||||
));
|
));
|
||||||
String? visitedVDoNotTerceirosStr(dynamic response) => castToType<String>(getJsonField(
|
String? visitedVDoNotTerceirosStr(dynamic response) =>
|
||||||
|
castToType<String>(getJsonField(
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_NOTTERCEIROS''',
|
r'''$.visitado.VDO_NOTTERCEIROS''',
|
||||||
));
|
));
|
||||||
|
@ -1538,7 +1636,8 @@ class GetDadosCall {
|
||||||
.map((x) => castToType<String>(x))
|
.map((x) => castToType<String>(x))
|
||||||
.withoutNulls
|
.withoutNulls
|
||||||
.toList();
|
.toList();
|
||||||
List<String>? levelNACIndPermiteReentradaStrList(dynamic response) => (getJsonField(
|
List<String>? levelNACIndPermiteReentradaStrList(dynamic response) =>
|
||||||
|
(getJsonField(
|
||||||
response,
|
response,
|
||||||
r'''$.niveis[:].NAC_INDPERMITEREENTRADA''',
|
r'''$.niveis[:].NAC_INDPERMITEREENTRADA''',
|
||||||
true,
|
true,
|
||||||
|
@ -1556,7 +1655,8 @@ class GetDadosCall {
|
||||||
.map((x) => castToType<String>(x))
|
.map((x) => castToType<String>(x))
|
||||||
.withoutNulls
|
.withoutNulls
|
||||||
.toList();
|
.toList();
|
||||||
List<String>? levelNACTempoAntiCaronaStrList(dynamic response) => (getJsonField(
|
List<String>? levelNACTempoAntiCaronaStrList(dynamic response) =>
|
||||||
|
(getJsonField(
|
||||||
response,
|
response,
|
||||||
r'''$.niveis[:].NAC_TEMPOANTICARONA''',
|
r'''$.niveis[:].NAC_TEMPOANTICARONA''',
|
||||||
true,
|
true,
|
||||||
|
@ -1590,9 +1690,12 @@ class GetVisitorByDocCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'getVisitante';
|
const String atividade = 'getVisitante';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -1644,9 +1747,12 @@ class GetFotoVisitanteCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'getFotoVisitante';
|
const String atividade = 'getFotoVisitante';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -1683,9 +1789,12 @@ class PostProvVisitSchedulingCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'putAgendamentoProv';
|
const String atividade = 'putAgendamentoProv';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -1732,9 +1841,12 @@ class GetVisitsCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'getVisitas';
|
const String atividade = 'getVisitas';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -1995,9 +2107,12 @@ class DeleteVisitCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'cancelaVisita';
|
const String atividade = 'cancelaVisita';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -2038,10 +2153,14 @@ class GetPessoasLocalCall {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String ownerUUID = (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
final String ownerUUID =
|
||||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? '';
|
||||||
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
callName: 'getPessoasLocal',
|
callName: 'getPessoasLocal',
|
||||||
|
@ -2104,9 +2223,12 @@ class RespondeSolicitacaoCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'respondeSolicitacao';
|
const String atividade = 'respondeSolicitacao';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -2154,9 +2276,12 @@ class GetAccessCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'getAcessos';
|
const String atividade = 'getAcessos';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -2403,9 +2528,12 @@ class GetLiberationsCall {
|
||||||
final StreamController<ApiCallResponse> controller = StreamController();
|
final StreamController<ApiCallResponse> controller = StreamController();
|
||||||
|
|
||||||
Future.microtask(() async {
|
Future.microtask(() async {
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'getSolicitacoes';
|
const String atividade = 'getSolicitacoes';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -2595,9 +2723,12 @@ class GetMessagesCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final String devUUID =
|
||||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final String userUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final String cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
const String atividade = 'getMensagens';
|
const String atividade = 'getMensagens';
|
||||||
|
|
||||||
return await ApiManager.instance.makeApiCall(
|
return await ApiManager.instance.makeApiCall(
|
||||||
|
@ -2641,7 +2772,8 @@ class ApiPagingParams {
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'PagingParams(nextPageNumber: $nextPageNumber, numItems: $numItems, lastResponse: $lastResponse,)';
|
String toString() =>
|
||||||
|
'PagingParams(nextPageNumber: $nextPageNumber, numItems: $numItems, lastResponse: $lastResponse,)';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _toEncodable(dynamic item) {
|
String _toEncodable(dynamic item) {
|
||||||
|
|
|
@ -107,7 +107,9 @@ class ApiCallResponse {
|
||||||
final Object? exception;
|
final Object? exception;
|
||||||
bool get succeeded => statusCode >= 200 && statusCode < 300;
|
bool get succeeded => statusCode >= 200 && statusCode < 300;
|
||||||
String getHeader(String headerName) => headers[headerName] ?? '';
|
String getHeader(String headerName) => headers[headerName] ?? '';
|
||||||
String get bodyText => response?.body ?? (jsonBody is String ? jsonBody as String : jsonEncode(jsonBody));
|
String get bodyText =>
|
||||||
|
response?.body ??
|
||||||
|
(jsonBody is String ? jsonBody as String : jsonEncode(jsonBody));
|
||||||
String get exceptionMessage => exception.toString();
|
String get exceptionMessage => exception.toString();
|
||||||
|
|
||||||
static ApiCallResponse fromHttpResponse(
|
static ApiCallResponse fromHttpResponse(
|
||||||
|
@ -121,7 +123,9 @@ class ApiCallResponse {
|
||||||
if (bodyType == BodyType.BLOB) {
|
if (bodyType == BodyType.BLOB) {
|
||||||
jsonBody = response.bodyBytes;
|
jsonBody = response.bodyBytes;
|
||||||
} else {
|
} else {
|
||||||
final responseBody = decodeUtf8 && returnBody ? const Utf8Decoder().convert(response.bodyBytes) : response.body;
|
final responseBody = decodeUtf8 && returnBody
|
||||||
|
? const Utf8Decoder().convert(response.bodyBytes)
|
||||||
|
: response.body;
|
||||||
jsonBody = returnBody ? json.decode(responseBody) : null;
|
jsonBody = returnBody ? json.decode(responseBody) : null;
|
||||||
}
|
}
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
|
@ -133,7 +137,8 @@ class ApiCallResponse {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ApiCallResponse fromCloudCallResponse(Map<String, dynamic> response) => ApiCallResponse(
|
static ApiCallResponse fromCloudCallResponse(Map<String, dynamic> response) =>
|
||||||
|
ApiCallResponse(
|
||||||
response['body'],
|
response['body'],
|
||||||
ApiManager.toStringMap(response['headers'] ?? {}),
|
ApiManager.toStringMap(response['headers'] ?? {}),
|
||||||
response['statusCode'] ?? 400,
|
response['statusCode'] ?? 400,
|
||||||
|
@ -150,14 +155,17 @@ class ApiManager {
|
||||||
|
|
||||||
static String? _accessToken;
|
static String? _accessToken;
|
||||||
|
|
||||||
static void clearCache(String callName) =>
|
static void clearCache(String callName) => _apiCache.keys
|
||||||
_apiCache.keys.toSet().forEach((k) => k.callName == callName ? _apiCache.remove(k) : null);
|
.toSet()
|
||||||
|
.forEach((k) => k.callName == callName ? _apiCache.remove(k) : null);
|
||||||
|
|
||||||
static Map<String, String> toStringMap(Map map) =>
|
static Map<String, String> toStringMap(Map map) =>
|
||||||
map.map((key, value) => MapEntry(key.toString(), value.toString()));
|
map.map((key, value) => MapEntry(key.toString(), value.toString()));
|
||||||
|
|
||||||
static String asQueryParams(Map<String, dynamic> map) =>
|
static String asQueryParams(Map<String, dynamic> map) => map.entries
|
||||||
map.entries.map((e) => "${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value.toString())}").join('&');
|
.map((e) =>
|
||||||
|
"${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value.toString())}")
|
||||||
|
.join('&');
|
||||||
|
|
||||||
static Future<ApiCallResponse> urlRequest(
|
static Future<ApiCallResponse> urlRequest(
|
||||||
ApiCallType callType,
|
ApiCallType callType,
|
||||||
|
@ -171,13 +179,15 @@ class ApiManager {
|
||||||
BodyType? bodyType,
|
BodyType? bodyType,
|
||||||
}) async {
|
}) async {
|
||||||
if (params.isNotEmpty) {
|
if (params.isNotEmpty) {
|
||||||
final specifier = Uri.parse(apiUrl).queryParameters.isNotEmpty ? '&' : '?';
|
final specifier =
|
||||||
|
Uri.parse(apiUrl).queryParameters.isNotEmpty ? '&' : '?';
|
||||||
apiUrl = '$apiUrl$specifier${asQueryParams(params)}';
|
apiUrl = '$apiUrl$specifier${asQueryParams(params)}';
|
||||||
}
|
}
|
||||||
if (isStreamingApi) {
|
if (isStreamingApi) {
|
||||||
client ??= http.Client();
|
client ??= http.Client();
|
||||||
final request = http.Request(callType.toString().split('.').last, Uri.parse(apiUrl))
|
final request =
|
||||||
..headers.addAll(toStringMap(headers));
|
http.Request(callType.toString().split('.').last, Uri.parse(apiUrl))
|
||||||
|
..headers.addAll(toStringMap(headers));
|
||||||
final streamedResponse = await getStreamedResponse(request);
|
final streamedResponse = await getStreamedResponse(request);
|
||||||
return ApiCallResponse(
|
return ApiCallResponse(
|
||||||
null,
|
null,
|
||||||
|
@ -189,8 +199,10 @@ class ApiManager {
|
||||||
final makeRequest = callType == ApiCallType.GET
|
final makeRequest = callType == ApiCallType.GET
|
||||||
? (client != null ? client.get : http.get)
|
? (client != null ? client.get : http.get)
|
||||||
: (client != null ? client.delete : http.delete);
|
: (client != null ? client.delete : http.delete);
|
||||||
final response = await makeRequest(Uri.parse(apiUrl), headers: toStringMap(headers));
|
final response =
|
||||||
return ApiCallResponse.fromHttpResponse(response, returnBody, decodeUtf8, bodyType);
|
await makeRequest(Uri.parse(apiUrl), headers: toStringMap(headers));
|
||||||
|
return ApiCallResponse.fromHttpResponse(
|
||||||
|
response, returnBody, decodeUtf8, bodyType);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<ApiCallResponse> requestWithBody(
|
static Future<ApiCallResponse> requestWithBody(
|
||||||
|
@ -212,11 +224,13 @@ class ApiManager {
|
||||||
(alwaysAllowBody && type == ApiCallType.DELETE),
|
(alwaysAllowBody && type == ApiCallType.DELETE),
|
||||||
'Invalid ApiCallType $type for request with body',
|
'Invalid ApiCallType $type for request with body',
|
||||||
);
|
);
|
||||||
final postBody = createBody(headers, params, body, bodyType, encodeBodyUtf8);
|
final postBody =
|
||||||
|
createBody(headers, params, body, bodyType, encodeBodyUtf8);
|
||||||
if (isStreamingApi) {
|
if (isStreamingApi) {
|
||||||
client ??= http.Client();
|
client ??= http.Client();
|
||||||
final request = http.Request(type.toString().split('.').last, Uri.parse(apiUrl))
|
final request =
|
||||||
..headers.addAll(toStringMap(headers));
|
http.Request(type.toString().split('.').last, Uri.parse(apiUrl))
|
||||||
|
..headers.addAll(toStringMap(headers));
|
||||||
request.body = postBody;
|
request.body = postBody;
|
||||||
final streamedResponse = await getStreamedResponse(request);
|
final streamedResponse = await getStreamedResponse(request);
|
||||||
return ApiCallResponse(
|
return ApiCallResponse(
|
||||||
|
@ -228,7 +242,8 @@ class ApiManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bodyType == BodyType.MULTIPART) {
|
if (bodyType == BodyType.MULTIPART) {
|
||||||
return multipartRequest(type, apiUrl, headers, params, returnBody, decodeUtf8, alwaysAllowBody, bodyType);
|
return multipartRequest(type, apiUrl, headers, params, returnBody,
|
||||||
|
decodeUtf8, alwaysAllowBody, bodyType);
|
||||||
}
|
}
|
||||||
|
|
||||||
final requestFn = {
|
final requestFn = {
|
||||||
|
@ -237,8 +252,10 @@ class ApiManager {
|
||||||
ApiCallType.PATCH: client != null ? client.patch : http.patch,
|
ApiCallType.PATCH: client != null ? client.patch : http.patch,
|
||||||
ApiCallType.DELETE: client != null ? client.delete : http.delete,
|
ApiCallType.DELETE: client != null ? client.delete : http.delete,
|
||||||
}[type]!;
|
}[type]!;
|
||||||
final response = await requestFn(Uri.parse(apiUrl), headers: toStringMap(headers), body: postBody);
|
final response = await requestFn(Uri.parse(apiUrl),
|
||||||
return ApiCallResponse.fromHttpResponse(response, returnBody, decodeUtf8, bodyType);
|
headers: toStringMap(headers), body: postBody);
|
||||||
|
return ApiCallResponse.fromHttpResponse(
|
||||||
|
response, returnBody, decodeUtf8, bodyType);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<ApiCallResponse> multipartRequest(
|
static Future<ApiCallResponse> multipartRequest(
|
||||||
|
@ -258,14 +275,19 @@ class ApiManager {
|
||||||
);
|
);
|
||||||
|
|
||||||
bool isFile(dynamic e) =>
|
bool isFile(dynamic e) =>
|
||||||
e is FFUploadedFile || e is List<FFUploadedFile> || (e is List && e.firstOrNull is FFUploadedFile);
|
e is FFUploadedFile ||
|
||||||
|
e is List<FFUploadedFile> ||
|
||||||
|
(e is List && e.firstOrNull is FFUploadedFile);
|
||||||
|
|
||||||
final nonFileParams = toStringMap(Map.fromEntries(params.entries.where((e) => !isFile(e.value))));
|
final nonFileParams = toStringMap(
|
||||||
|
Map.fromEntries(params.entries.where((e) => !isFile(e.value))));
|
||||||
|
|
||||||
List<http.MultipartFile> files = [];
|
List<http.MultipartFile> files = [];
|
||||||
params.entries.where((e) => isFile(e.value)).forEach((e) {
|
params.entries.where((e) => isFile(e.value)).forEach((e) {
|
||||||
final param = e.value;
|
final param = e.value;
|
||||||
final uploadedFiles = param is List ? param as List<FFUploadedFile> : [param as FFUploadedFile];
|
final uploadedFiles = param is List
|
||||||
|
? param as List<FFUploadedFile>
|
||||||
|
: [param as FFUploadedFile];
|
||||||
for (var uploadedFile in uploadedFiles) {
|
for (var uploadedFile in uploadedFiles) {
|
||||||
files.add(
|
files.add(
|
||||||
http.MultipartFile.fromBytes(
|
http.MultipartFile.fromBytes(
|
||||||
|
@ -278,13 +300,15 @@ class ApiManager {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
final request = http.MultipartRequest(type.toString().split('.').last, Uri.parse(apiUrl))
|
final request = http.MultipartRequest(
|
||||||
|
type.toString().split('.').last, Uri.parse(apiUrl))
|
||||||
..headers.addAll(toStringMap(headers))
|
..headers.addAll(toStringMap(headers))
|
||||||
..files.addAll(files);
|
..files.addAll(files);
|
||||||
nonFileParams.forEach((key, value) => request.fields[key] = value);
|
nonFileParams.forEach((key, value) => request.fields[key] = value);
|
||||||
|
|
||||||
final response = await http.Response.fromStream(await request.send());
|
final response = await http.Response.fromStream(await request.send());
|
||||||
return ApiCallResponse.fromHttpResponse(response, returnBody, decodeUtf8, bodyType);
|
return ApiCallResponse.fromHttpResponse(
|
||||||
|
response, returnBody, decodeUtf8, bodyType);
|
||||||
}
|
}
|
||||||
|
|
||||||
static MediaType? _getMediaType(String? filename) {
|
static MediaType? _getMediaType(String? filename) {
|
||||||
|
@ -333,10 +357,13 @@ class ApiManager {
|
||||||
case null:
|
case null:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (contentType != null && !headers.keys.any((h) => h.toLowerCase() == 'content-type')) {
|
if (contentType != null &&
|
||||||
|
!headers.keys.any((h) => h.toLowerCase() == 'content-type')) {
|
||||||
headers['Content-Type'] = contentType;
|
headers['Content-Type'] = contentType;
|
||||||
}
|
}
|
||||||
return encodeBodyUtf8 && postBody is String ? utf8.encode(postBody) : postBody;
|
return encodeBodyUtf8 && postBody is String
|
||||||
|
? utf8.encode(postBody)
|
||||||
|
: postBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<ApiCallResponse> call(ApiCallOptions options) => makeApiCall(
|
Future<ApiCallResponse> call(ApiCallOptions options) => makeApiCall(
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
import 'package:http/http.dart';
|
import 'package:http/http.dart';
|
||||||
|
|
||||||
Future<StreamedResponse> getStreamedResponse(Request request) => Client().send(request);
|
Future<StreamedResponse> getStreamedResponse(Request request) =>
|
||||||
|
Client().send(request);
|
||||||
|
|
|
@ -10,7 +10,8 @@ extension FFEnumExtensions<T extends Enum> on T {
|
||||||
}
|
}
|
||||||
|
|
||||||
extension FFEnumListExtensions<T extends Enum> on Iterable<T> {
|
extension FFEnumListExtensions<T extends Enum> on Iterable<T> {
|
||||||
T? deserialize(String? value) => firstWhereOrNull((e) => e.serialize() == value);
|
T? deserialize(String? value) =>
|
||||||
|
firstWhereOrNull((e) => e.serialize() == value);
|
||||||
}
|
}
|
||||||
|
|
||||||
T? deserializeEnum<T>(String? value) {
|
T? deserializeEnum<T>(String? value) {
|
||||||
|
|
|
@ -41,7 +41,8 @@ class DeviceStruct extends BaseStruct {
|
||||||
description: data['description'] as String?,
|
description: data['description'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
static DeviceStruct? maybeFromMap(dynamic data) => data is Map ? DeviceStruct.fromMap(data.cast<String, dynamic>()) : null;
|
static DeviceStruct? maybeFromMap(dynamic data) =>
|
||||||
|
data is Map ? DeviceStruct.fromMap(data.cast<String, dynamic>()) : null;
|
||||||
|
|
||||||
Map<String, dynamic> toMap() => {
|
Map<String, dynamic> toMap() => {
|
||||||
'devUUID': _devUUID,
|
'devUUID': _devUUID,
|
||||||
|
@ -65,7 +66,8 @@ class DeviceStruct extends BaseStruct {
|
||||||
),
|
),
|
||||||
}.withoutNulls;
|
}.withoutNulls;
|
||||||
|
|
||||||
static DeviceStruct fromSerializableMap(Map<String, dynamic> data) => DeviceStruct(
|
static DeviceStruct fromSerializableMap(Map<String, dynamic> data) =>
|
||||||
|
DeviceStruct(
|
||||||
devUUID: deserializeParam(
|
devUUID: deserializeParam(
|
||||||
data['devUUID'],
|
data['devUUID'],
|
||||||
ParamType.String,
|
ParamType.String,
|
||||||
|
@ -88,11 +90,15 @@ class DeviceStruct extends BaseStruct {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is DeviceStruct && devUUID == other.devUUID && version == other.version && description == other.description;
|
return other is DeviceStruct &&
|
||||||
|
devUUID == other.devUUID &&
|
||||||
|
version == other.version &&
|
||||||
|
description == other.description;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => const ListEquality().hash([devUUID, version, description]);
|
int get hashCode =>
|
||||||
|
const ListEquality().hash([devUUID, version, description]);
|
||||||
}
|
}
|
||||||
|
|
||||||
DeviceStruct createDeviceStruct({
|
DeviceStruct createDeviceStruct({
|
||||||
|
|
|
@ -33,7 +33,10 @@ dynamic deserializeStructParam<T>(
|
||||||
if (paramValues is! Iterable) {
|
if (paramValues is! Iterable) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return paramValues.map<T>((e) => deserializeStructParam<T>(e, paramType, false, structBuilder: structBuilder)).toList();
|
return paramValues
|
||||||
|
.map<T>((e) => deserializeStructParam<T>(e, paramType, false,
|
||||||
|
structBuilder: structBuilder))
|
||||||
|
.toList();
|
||||||
} else if (param is Map<String, dynamic>) {
|
} else if (param is Map<String, dynamic>) {
|
||||||
return structBuilder(param);
|
return structBuilder(param);
|
||||||
} else {
|
} else {
|
||||||
|
@ -50,9 +53,16 @@ List<T>? getStructList<T>(
|
||||||
dynamic value,
|
dynamic value,
|
||||||
StructBuilder<T> structBuilder,
|
StructBuilder<T> structBuilder,
|
||||||
) =>
|
) =>
|
||||||
value is! List ? null : value.whereType<Map<String, dynamic>>().map((e) => structBuilder(e)).toList();
|
value is! List
|
||||||
|
? null
|
||||||
|
: value
|
||||||
|
.whereType<Map<String, dynamic>>()
|
||||||
|
.map((e) => structBuilder(e))
|
||||||
|
.toList();
|
||||||
|
|
||||||
List<T>? getEnumList<T>(dynamic value) => value is! List ? null : value.map((e) => deserializeEnum<T>(e)).withoutNulls;
|
List<T>? getEnumList<T>(dynamic value) => value is! List
|
||||||
|
? null
|
||||||
|
: value.map((e) => deserializeEnum<T>(e)).withoutNulls;
|
||||||
|
|
||||||
Color? getSchemaColor(dynamic value) => value is String
|
Color? getSchemaColor(dynamic value) => value is String
|
||||||
? fromCssColor(value)
|
? fromCssColor(value)
|
||||||
|
@ -60,6 +70,8 @@ Color? getSchemaColor(dynamic value) => value is String
|
||||||
? value
|
? value
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
List<Color>? getColorsList(dynamic value) => value is! List ? null : value.map(getSchemaColor).withoutNulls;
|
List<Color>? getColorsList(dynamic value) =>
|
||||||
|
value is! List ? null : value.map(getSchemaColor).withoutNulls;
|
||||||
|
|
||||||
List<T>? getDataList<T>(dynamic value) => value is! List ? null : value.map((e) => castToType<T>(e)!).toList();
|
List<T>? getDataList<T>(dynamic value) =>
|
||||||
|
value is! List ? null : value.map((e) => castToType<T>(e)!).toList();
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -23,7 +23,8 @@ class AcessHistoryPageModel extends FlutterFlowModel<AccessHistoryScreen> {
|
||||||
requestFn: requestFn,
|
requestFn: requestFn,
|
||||||
);
|
);
|
||||||
void clearAccessHistoryCache() => _accessHistoryManager.clear();
|
void clearAccessHistoryCache() => _accessHistoryManager.clear();
|
||||||
void clearAccessHistoryCacheKey(String? uniqueKey) => _accessHistoryManager.clearRequest(uniqueKey);
|
void clearAccessHistoryCacheKey(String? uniqueKey) =>
|
||||||
|
_accessHistoryManager.clearRequest(uniqueKey);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {
|
void initState(BuildContext context) {
|
||||||
|
@ -32,8 +33,10 @@ class AcessHistoryPageModel extends FlutterFlowModel<AccessHistoryScreen> {
|
||||||
|
|
||||||
Future<void> initDatabase() async {
|
Future<void> initDatabase() async {
|
||||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
userUUID =
|
||||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -33,8 +33,11 @@ class ProvisionalHistoryStateBloc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ProvisionalHistoryBloc extends Bloc<ProvisionalHistoryEvent, ProvisionalHistoryStateBloc> {
|
class ProvisionalHistoryBloc
|
||||||
ProvisionalHistoryBloc() : super(ProvisionalHistoryStateBloc(devUUID: '', userUUID: '', cliUUID: '')) {
|
extends Bloc<ProvisionalHistoryEvent, ProvisionalHistoryStateBloc> {
|
||||||
|
ProvisionalHistoryBloc()
|
||||||
|
: super(ProvisionalHistoryStateBloc(
|
||||||
|
devUUID: '', userUUID: '', cliUUID: '')) {
|
||||||
on<LoadProvisionalHistory>(_onLoadProvisionalHistory);
|
on<LoadProvisionalHistory>(_onLoadProvisionalHistory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,9 +46,16 @@ class ProvisionalHistoryBloc extends Bloc<ProvisionalHistoryEvent, ProvisionalHi
|
||||||
Emitter<ProvisionalHistoryStateBloc> emit,
|
Emitter<ProvisionalHistoryStateBloc> emit,
|
||||||
) async {
|
) async {
|
||||||
emit(state.copyWith(isLoading: true));
|
emit(state.copyWith(isLoading: true));
|
||||||
final devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
final devUUID =
|
||||||
final userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||||
final cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
final userUUID =
|
||||||
emit(state.copyWith(devUUID: devUUID, userUUID: userUUID, cliUUID: cliUUID, isLoading: false));
|
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||||
|
final cliUUID =
|
||||||
|
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||||
|
emit(state.copyWith(
|
||||||
|
devUUID: devUUID,
|
||||||
|
userUUID: userUUID,
|
||||||
|
cliUUID: cliUUID,
|
||||||
|
isLoading: false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,8 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
||||||
late Future<void> _accessFuture;
|
late Future<void> _accessFuture;
|
||||||
List<dynamic> _accessWrap = [];
|
List<dynamic> _accessWrap = [];
|
||||||
|
|
||||||
_AccessHistoryState(Map<String, String> opt) : selectedTypeSubject = BehaviorSubject.seeded(opt) {
|
_AccessHistoryState(Map<String, String> opt)
|
||||||
|
: selectedTypeSubject = BehaviorSubject.seeded(opt) {
|
||||||
selectedTypeSubject.listen((value) {});
|
selectedTypeSubject.listen((value) {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +54,8 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
||||||
|
|
||||||
_scrollController = ScrollController()
|
_scrollController = ScrollController()
|
||||||
..addListener(() {
|
..addListener(() {
|
||||||
if (_scrollController.position.atEdge && _scrollController.position.pixels != 0) {
|
if (_scrollController.position.atEdge &&
|
||||||
|
_scrollController.position.pixels != 0) {
|
||||||
_loadMoreAccess();
|
_loadMoreAccess();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -113,7 +115,8 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
||||||
color: theme.primaryText,
|
color: theme.primaryText,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(theme.headlineMediumFamily),
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey(theme.headlineMediumFamily),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -127,37 +130,40 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
||||||
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: FilterWidget(
|
onTap: () {},
|
||||||
defaultSelections: selectedTypeSubject.value,
|
child: FilterWidget(
|
||||||
filterOptions: {
|
defaultSelections: selectedTypeSubject.value,
|
||||||
'personType': [
|
filterOptions: {
|
||||||
{
|
'personType': [
|
||||||
'title': FFLocalizations.of(context).getText('zok7lu4w'),
|
{
|
||||||
'value': 'E',
|
'title': FFLocalizations.of(context)
|
||||||
|
.getText('zok7lu4w'),
|
||||||
|
'value': 'E',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'title': FFLocalizations.of(context)
|
||||||
|
.getText('oonqk812'),
|
||||||
|
'value': 'O',
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
filterTitles: {'personType': ''},
|
||||||
'title': FFLocalizations.of(context).getText('oonqk812'),
|
),
|
||||||
'value': 'O',
|
),
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
filterTitles: {'personType': ''},
|
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
),
|
});
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (selectedFilter != null) {
|
if (selectedFilter != null) {
|
||||||
_updateAccessHistoryAction(selectedFilter);
|
_updateAccessHistoryAction(selectedFilter);
|
||||||
|
@ -200,7 +206,8 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
||||||
final List<dynamic> accessHistory = response.jsonBody['acessos'] ?? [];
|
final List<dynamic> accessHistory = response.jsonBody['acessos'] ?? [];
|
||||||
|
|
||||||
List<dynamic> filteredAccess = accessHistory.where((item) {
|
List<dynamic> filteredAccess = accessHistory.where((item) {
|
||||||
final personTypeMatches = _personType == '.*' || item["PES_TIPO"].toString() == _personType;
|
final personTypeMatches =
|
||||||
|
_personType == '.*' || item["PES_TIPO"].toString() == _personType;
|
||||||
return personTypeMatches;
|
return personTypeMatches;
|
||||||
}).toList();
|
}).toList();
|
||||||
|
|
||||||
|
@ -233,7 +240,8 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
||||||
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(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||||
|
@ -257,7 +265,9 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(ptText: "Nenhum histórico encontrado!", enText: "No history found!"),
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: "Nenhum histórico encontrado!",
|
||||||
|
enText: "No history found!"),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -297,7 +307,8 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
||||||
return FutureBuilder<void>(
|
return FutureBuilder<void>(
|
||||||
future: _accessFuture,
|
future: _accessFuture,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.waiting && _accessWrap.isEmpty) {
|
if (snapshot.connectionState == ConnectionState.waiting &&
|
||||||
|
_accessWrap.isEmpty) {
|
||||||
return Center(
|
return Center(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 50.0,
|
width: 50.0,
|
||||||
|
@ -310,7 +321,9 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
||||||
);
|
);
|
||||||
} else if (snapshot.hasError) {
|
} else if (snapshot.hasError) {
|
||||||
return Center(
|
return Center(
|
||||||
child: Text(FFLocalizations.of(context).getVariableText(ptText: "Falha ao efetuar operação!", enText: "Failed to perform operation!")),
|
child: Text(FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: "Falha ao efetuar operação!",
|
||||||
|
enText: "Failed to perform operation!")),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,7 +341,8 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _accessHistoryCardMoleculeWidget(BuildContext context, dynamic accessHistoryItem) {
|
Widget _accessHistoryCardMoleculeWidget(
|
||||||
|
BuildContext context, dynamic accessHistoryItem) {
|
||||||
return CardItemTemplateComponentWidget(
|
return CardItemTemplateComponentWidget(
|
||||||
imagePath:
|
imagePath:
|
||||||
'https://freaccess.com.br/freaccess/getImage.php?cliID=${_model.cliUUID}&atividade=getFoto&Documento=${accessHistoryItem['PES_ID'] ?? ''}&tipo=${accessHistoryItem['PES_TIPO'] ?? ''}',
|
'https://freaccess.com.br/freaccess/getImage.php?cliID=${_model.cliUUID}&atividade=getFoto&Documento=${accessHistoryItem['PES_ID'] ?? ''}&tipo=${accessHistoryItem['PES_TIPO'] ?? ''}',
|
||||||
|
|
|
@ -20,7 +20,8 @@ import 'package:rxdart/rxdart.dart';
|
||||||
// ignore: must_be_immutable
|
// ignore: must_be_immutable
|
||||||
class ProvisionalHistoryPage extends StatefulWidget {
|
class ProvisionalHistoryPage extends StatefulWidget {
|
||||||
Map<String, String> opt;
|
Map<String, String> opt;
|
||||||
ProvisionalHistoryPage({super.key, Map<String, String>? opt}) : opt = opt ?? const {'AGP_STATUS': '.*'};
|
ProvisionalHistoryPage({super.key, Map<String, String>? opt})
|
||||||
|
: opt = opt ?? const {'AGP_STATUS': '.*'};
|
||||||
@override
|
@override
|
||||||
State<ProvisionalHistoryPage> createState() => ProvisionalHistoryState(opt);
|
State<ProvisionalHistoryPage> createState() => ProvisionalHistoryState(opt);
|
||||||
}
|
}
|
||||||
|
@ -40,7 +41,8 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
||||||
late Future<void> future;
|
late Future<void> future;
|
||||||
List<dynamic> wrap = [];
|
List<dynamic> wrap = [];
|
||||||
|
|
||||||
ProvisionalHistoryState(Map<String, String> opt) : selectedTypeSubject = BehaviorSubject.seeded(opt) {
|
ProvisionalHistoryState(Map<String, String> opt)
|
||||||
|
: selectedTypeSubject = BehaviorSubject.seeded(opt) {
|
||||||
selectedTypeSubject.listen((value) {});
|
selectedTypeSubject.listen((value) {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +52,8 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
||||||
future = fetchHistoryService();
|
future = fetchHistoryService();
|
||||||
_scrollController = ScrollController()
|
_scrollController = ScrollController()
|
||||||
..addListener(() {
|
..addListener(() {
|
||||||
if (_scrollController.position.atEdge && _scrollController.position.pixels != 0) {
|
if (_scrollController.position.atEdge &&
|
||||||
|
_scrollController.position.pixels != 0) {
|
||||||
_loadMore();
|
_loadMore();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -112,7 +115,8 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
||||||
color: theme.primaryText,
|
color: theme.primaryText,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(theme.headlineMediumFamily),
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey(theme.headlineMediumFamily),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -126,57 +130,62 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
||||||
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: FilterWidget(
|
onTap: () {},
|
||||||
defaultSelections: selectedTypeSubject.value,
|
child: FilterWidget(
|
||||||
filterOptions: {
|
defaultSelections: selectedTypeSubject.value,
|
||||||
'AGP_STATUS': [
|
filterOptions: {
|
||||||
{
|
'AGP_STATUS': [
|
||||||
'title': FFLocalizations.of(context).getVariableText(
|
{
|
||||||
ptText: 'Ativo',
|
'title': FFLocalizations.of(context)
|
||||||
enText: 'Active',
|
.getVariableText(
|
||||||
),
|
ptText: 'Ativo',
|
||||||
'value': 'AT',
|
enText: 'Active',
|
||||||
|
),
|
||||||
|
'value': 'AT',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'title': FFLocalizations.of(context)
|
||||||
|
.getVariableText(
|
||||||
|
ptText: 'Convidado',
|
||||||
|
enText: 'Guest',
|
||||||
|
),
|
||||||
|
'value': 'CO',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'title': FFLocalizations.of(context)
|
||||||
|
.getVariableText(
|
||||||
|
ptText: 'Inativo',
|
||||||
|
enText: 'Inactive',
|
||||||
|
),
|
||||||
|
'value': 'IN',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'title': FFLocalizations.of(context)
|
||||||
|
.getVariableText(
|
||||||
|
ptText: 'Aguardando Aprovação',
|
||||||
|
enText: 'Awaiting Approval',
|
||||||
|
),
|
||||||
|
'value': 'AA',
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
filterTitles: {'AGP_STATUS': ''},
|
||||||
'title': FFLocalizations.of(context).getVariableText(
|
),
|
||||||
ptText: 'Convidado',
|
),
|
||||||
enText: 'Guest',
|
|
||||||
),
|
|
||||||
'value': 'CO',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'title': FFLocalizations.of(context).getVariableText(
|
|
||||||
ptText: 'Inativo',
|
|
||||||
enText: 'Inactive',
|
|
||||||
),
|
|
||||||
'value': 'IN',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'title': FFLocalizations.of(context).getVariableText(
|
|
||||||
ptText: 'Aguardando Aprovação',
|
|
||||||
enText: 'Awaiting Approval',
|
|
||||||
),
|
|
||||||
'value': 'AA',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
filterTitles: {'AGP_STATUS': ''},
|
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
),
|
});
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (selectedFilter != null) {
|
if (selectedFilter != null) {
|
||||||
_updateHistoryAction(selectedFilter);
|
_updateHistoryAction(selectedFilter);
|
||||||
|
@ -210,9 +219,11 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
||||||
Future<ApiCallResponse?> fetchHistoryService() async {
|
Future<ApiCallResponse?> fetchHistoryService() async {
|
||||||
try {
|
try {
|
||||||
setState(() => _loading = true);
|
setState(() => _loading = true);
|
||||||
var response = await PhpGroup.getProvSchedules(_pageNumber.toString(), status);
|
var response =
|
||||||
|
await PhpGroup.getProvSchedules(_pageNumber.toString(), status);
|
||||||
|
|
||||||
final List<dynamic> history = response.jsonBody['agendamento']['value'] ?? [];
|
final List<dynamic> history =
|
||||||
|
response.jsonBody['agendamento']['value'] ?? [];
|
||||||
|
|
||||||
if (history.isNotEmpty) {
|
if (history.isNotEmpty) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -251,7 +262,9 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(ptText: "Nenhum histórico encontrado!", enText: "No history found!"),
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: "Nenhum histórico encontrado!",
|
||||||
|
enText: "No history found!"),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -291,7 +304,8 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
||||||
return FutureBuilder<void>(
|
return FutureBuilder<void>(
|
||||||
future: future,
|
future: future,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.waiting && wrap.isEmpty) {
|
if (snapshot.connectionState == ConnectionState.waiting &&
|
||||||
|
wrap.isEmpty) {
|
||||||
return Center(
|
return Center(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 50.0,
|
width: 50.0,
|
||||||
|
@ -304,7 +318,9 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
||||||
);
|
);
|
||||||
} else if (snapshot.hasError) {
|
} else if (snapshot.hasError) {
|
||||||
return Center(
|
return Center(
|
||||||
child: Text(FFLocalizations.of(context).getVariableText(ptText: "Falha ao efetuar operação!", enText: "Failed to perform operation!")),
|
child: Text(FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: "Falha ao efetuar operação!",
|
||||||
|
enText: "Failed to perform operation!")),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,7 +354,8 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, String> _buildLabelsHashMap(BuildContext context, dynamic historyItem) {
|
Map<String, String> _buildLabelsHashMap(
|
||||||
|
BuildContext context, dynamic historyItem) {
|
||||||
return {
|
return {
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Nome:',
|
ptText: 'Nome:',
|
||||||
|
@ -370,7 +387,8 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
||||||
return "${dateTime.day.toString().padLeft(2, '0')}/${dateTime.month.toString().padLeft(2, '0')}/${dateTime.year} ${dateTime.hour.toString().padLeft(2, '0')}:${dateTime.minute.toString().padLeft(2, '0')}";
|
return "${dateTime.day.toString().padLeft(2, '0')}/${dateTime.month.toString().padLeft(2, '0')}/${dateTime.year} ${dateTime.hour.toString().padLeft(2, '0')}:${dateTime.minute.toString().padLeft(2, '0')}";
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Map<String, Color>> _buildStatusHashMap(BuildContext context, dynamic historyItem) {
|
List<Map<String, Color>> _buildStatusHashMap(
|
||||||
|
BuildContext context, dynamic historyItem) {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
|
|
@ -20,7 +20,8 @@ class AccessFilterModel extends FlutterFlowModel<AccessFilter> {
|
||||||
// State field(s) for CheckboxGroup widget.
|
// State field(s) for CheckboxGroup widget.
|
||||||
FormFieldController<List<String>>? checkboxGroupValueController;
|
FormFieldController<List<String>>? checkboxGroupValueController;
|
||||||
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
||||||
set checkboxGroupValues(List<String>? v) => checkboxGroupValueController?.value = v;
|
set checkboxGroupValues(List<String>? v) =>
|
||||||
|
checkboxGroupValueController?.value = v;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
@ -71,8 +72,12 @@ class _AccessFilterState extends State<AccessFilter> {
|
||||||
_model.textFieldFocusNode ??= FocusNode();
|
_model.textFieldFocusNode ??= FocusNode();
|
||||||
|
|
||||||
selected = {
|
selected = {
|
||||||
'personType': widget.defaultPersonType == '.*' ? ['E', 'O'] : [widget.defaultPersonType],
|
'personType': widget.defaultPersonType == '.*'
|
||||||
'accessType': widget.defaultAccessType == '.*' ? ['0', '1'] : [widget.defaultAccessType],
|
? ['E', 'O']
|
||||||
|
: [widget.defaultPersonType],
|
||||||
|
'accessType': widget.defaultAccessType == '.*'
|
||||||
|
? ['0', '1']
|
||||||
|
: [widget.defaultAccessType],
|
||||||
'search': '.*',
|
'search': '.*',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -81,7 +86,9 @@ class _AccessFilterState extends State<AccessFilter> {
|
||||||
Map<String, String> filterResult = {
|
Map<String, String> filterResult = {
|
||||||
'personType': '',
|
'personType': '',
|
||||||
'accessType': '',
|
'accessType': '',
|
||||||
'search': _model.textController?.text == '' ? '.*' : _model.textController!.text.toLowerCase(),
|
'search': _model.textController?.text == ''
|
||||||
|
? '.*'
|
||||||
|
: _model.textController!.text.toLowerCase(),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (selected['personType']!.isEmpty) {
|
if (selected['personType']!.isEmpty) {
|
||||||
|
@ -104,7 +111,8 @@ class _AccessFilterState extends State<AccessFilter> {
|
||||||
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);
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
|
@ -121,7 +129,8 @@ class _AccessFilterState extends State<AccessFilter> {
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
fontSize: limitedInputFontSize,
|
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,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -141,7 +150,8 @@ class _AccessFilterState extends State<AccessFilter> {
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontSize: limitedInputFontSize,
|
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,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -168,7 +178,8 @@ class _AccessFilterState extends State<AccessFilter> {
|
||||||
width: 5,
|
width: 5,
|
||||||
color: FlutterFlowTheme.of(context).secondaryText,
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
),
|
),
|
||||||
controlAffinity: ListTileControlAffinity.leading, // Adiciona esta linha
|
controlAffinity:
|
||||||
|
ListTileControlAffinity.leading, // Adiciona esta linha
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -211,16 +222,24 @@ class _AccessFilterState extends State<AccessFilter> {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 10.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
10.0, 10.0, 0.0, 10.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText('yfj9pd6k'), // Filtros
|
FFLocalizations.of(context)
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
.getText('yfj9pd6k'), // Filtros
|
||||||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.headlineMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.headlineMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
|
fontSize:
|
||||||
|
LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.headlineMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -233,7 +252,8 @@ class _AccessFilterState extends State<AccessFilter> {
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
_buildCheckboxListTile('personType', personTypeOptions, 14),
|
_buildCheckboxListTile(
|
||||||
|
'personType', personTypeOptions, 14),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -247,12 +267,15 @@ class _AccessFilterState extends State<AccessFilter> {
|
||||||
),
|
),
|
||||||
child: Text(FFLocalizations.of(context).getText('88kshkph'),
|
child: Text(FFLocalizations.of(context).getText('88kshkph'),
|
||||||
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).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
fontSize:
|
||||||
|
LimitedFontSizeUtil.getInputFontSize(context),
|
||||||
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),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -17,7 +17,8 @@ class FilterModel extends FlutterFlowModel<FilterWidget> {
|
||||||
bool? checkboxValue2;
|
bool? checkboxValue2;
|
||||||
FormFieldController<List<String>>? checkboxGroupValueController;
|
FormFieldController<List<String>>? checkboxGroupValueController;
|
||||||
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
||||||
set checkboxGroupValues(List<String>? v) => checkboxGroupValueController?.value = v;
|
set checkboxGroupValues(List<String>? v) =>
|
||||||
|
checkboxGroupValueController?.value = v;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
@ -69,11 +70,15 @@ class _FilterWidgetState extends State<FilterWidget> {
|
||||||
|
|
||||||
void _applyFilter() {
|
void _applyFilter() {
|
||||||
Map<String, String> filterResult = {
|
Map<String, String> filterResult = {
|
||||||
'search': _model.textController?.text == '' ? '.*' : _model.textController!.text.toLowerCase(),
|
'search': _model.textController?.text == ''
|
||||||
|
? '.*'
|
||||||
|
: _model.textController!.text.toLowerCase(),
|
||||||
};
|
};
|
||||||
|
|
||||||
widget.filterOptions.forEach((key, options) {
|
widget.filterOptions.forEach((key, options) {
|
||||||
filterResult[key] = selected[key]!.isEmpty || selected[key]!.length < 1 ? '.*' : selected[key]!;
|
filterResult[key] = selected[key]!.isEmpty || selected[key]!.length < 1
|
||||||
|
? '.*'
|
||||||
|
: selected[key]!;
|
||||||
});
|
});
|
||||||
setState(() {
|
setState(() {
|
||||||
// Update the state with the new filter result
|
// Update the state with the new filter result
|
||||||
|
@ -82,7 +87,8 @@ class _FilterWidgetState extends State<FilterWidget> {
|
||||||
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);
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
|
@ -99,7 +105,8 @@ class _FilterWidgetState extends State<FilterWidget> {
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
fontSize: limitedInputFontSize,
|
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,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -119,7 +126,8 @@ class _FilterWidgetState extends State<FilterWidget> {
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontSize: limitedInputFontSize,
|
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,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -175,19 +183,26 @@ class _FilterWidgetState extends State<FilterWidget> {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 10.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
10.0, 10.0, 0.0, 10.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Filtros',
|
ptText: 'Filtros',
|
||||||
enText: 'Filters',
|
enText: 'Filters',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
.headlineMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.headlineMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
|
fontSize:
|
||||||
|
LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.headlineMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -200,7 +215,8 @@ class _FilterWidgetState extends State<FilterWidget> {
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: widget.filterOptions.keys.map((key) {
|
children: widget.filterOptions.keys.map((key) {
|
||||||
return _buildCheckboxListTile(key, widget.filterOptions[key]!, 14);
|
return _buildCheckboxListTile(
|
||||||
|
key, widget.filterOptions[key]!, 14);
|
||||||
}).toList(),
|
}).toList(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -218,12 +234,15 @@ class _FilterWidgetState extends State<FilterWidget> {
|
||||||
enText: 'Apply',
|
enText: 'Apply',
|
||||||
),
|
),
|
||||||
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).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
fontSize:
|
||||||
|
LimitedFontSizeUtil.getInputFontSize(context),
|
||||||
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),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue