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 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
|
||||
Widget build(BuildContext context) {
|
||||
|
|
|
@ -65,7 +65,8 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
|||
fontSize: 32.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).headlineLargeFamily),
|
||||
),
|
||||
pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
pickerForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||
|
@ -88,19 +89,27 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
|||
child!,
|
||||
headerBackgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
headerForegroundColor: FlutterFlowTheme.of(context).info,
|
||||
headerTextStyle: FlutterFlowTheme.of(context).headlineLarge.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).headlineLargeFamily,
|
||||
fontSize: 32.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
|
||||
),
|
||||
pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
headerTextStyle:
|
||||
FlutterFlowTheme.of(context).headlineLarge.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).headlineLargeFamily,
|
||||
fontSize: 32.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).headlineLargeFamily),
|
||||
),
|
||||
pickerBackgroundColor:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
pickerForegroundColor: FlutterFlowTheme.of(context).info,
|
||||
selectedDateTimeBackgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
selectedDateTimeForegroundColor: FlutterFlowTheme.of(context).info,
|
||||
pickerDialForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||
actionButtonForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||
selectedDateTimeBackgroundColor:
|
||||
FlutterFlowTheme.of(context).primary,
|
||||
selectedDateTimeForegroundColor:
|
||||
FlutterFlowTheme.of(context).info,
|
||||
pickerDialForegroundColor:
|
||||
FlutterFlowTheme.of(context).primaryText,
|
||||
actionButtonForegroundColor:
|
||||
FlutterFlowTheme.of(context).primaryText,
|
||||
iconSize: 24.0,
|
||||
);
|
||||
},
|
||||
|
@ -157,7 +166,8 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
|||
child: Stack(
|
||||
children: [
|
||||
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(
|
||||
controller: widget.controller,
|
||||
focusNode: widget.focusNode,
|
||||
|
@ -167,20 +177,26 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
|||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
hintText: widget.hintText,
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
lineHeight: 1.0,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
|
@ -217,9 +233,11 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
lineHeight: 1.8,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
|
@ -227,7 +245,8 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
|||
),
|
||||
),
|
||||
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(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
|
|
|
@ -52,7 +52,8 @@ class _CustomSelectState extends State<CustomSelect> {
|
|||
children: [
|
||||
Expanded(
|
||||
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(
|
||||
width: 100.0,
|
||||
height: 48.0,
|
||||
|
@ -66,11 +67,14 @@ class _CustomSelectState extends State<CustomSelect> {
|
|||
isMultiSelect: false,
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
textStyle: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
textStyle: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintText: widget.hintText,
|
||||
|
@ -83,7 +87,8 @@ class _CustomSelectState extends State<CustomSelect> {
|
|||
borderColor: FlutterFlowTheme.of(context).customColor6,
|
||||
borderWidth: 0.5,
|
||||
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,
|
||||
isOverButton: true,
|
||||
isSearchable: false,
|
||||
|
@ -96,25 +101,32 @@ class _CustomSelectState extends State<CustomSelect> {
|
|||
if (widget.isRequired)
|
||||
if (widget.dropDownValue == null || widget.dropDownValue == '')
|
||||
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(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.only(top: 5, start: 15),
|
||||
padding:
|
||||
const EdgeInsetsDirectional.only(top: 5, start: 15),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'This field is required',
|
||||
ptText: 'Este campo é obrigatório',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
||||
fontSize: limitedInputFontSize)),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodySmall
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodySmallFamily,
|
||||
color:
|
||||
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(
|
||||
builder: (context) {
|
||||
if (widget.uploadedFiles != null && widget.uploadedFiles!.bytes!.isNotEmpty) {
|
||||
if (widget.uploadedFiles != null &&
|
||||
widget.uploadedFiles!.bytes!.isNotEmpty) {
|
||||
{
|
||||
return InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
|
@ -47,7 +48,8 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
|||
onTap: () async {
|
||||
setState(() {
|
||||
widget.isUploading = false;
|
||||
widget.uploadedFiles = FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||
widget.uploadedFiles =
|
||||
FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||
widget.onUploadComplete(widget.uploadedFiles!);
|
||||
});
|
||||
},
|
||||
|
@ -72,7 +74,8 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
|||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
final selectedMedia = await selectMediaWithSourceBottomSheet(
|
||||
final selectedMedia =
|
||||
await selectMediaWithSourceBottomSheet(
|
||||
context: context,
|
||||
imageQuality: 100,
|
||||
allowPhoto: true,
|
||||
|
@ -84,7 +87,9 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
|||
|
||||
try {
|
||||
final message = FFLocalizations.of(context)
|
||||
.getVariableText(enText: 'Uploading file...', ptText: 'Enviando arquivo...');
|
||||
.getVariableText(
|
||||
enText: 'Uploading file...',
|
||||
ptText: 'Enviando arquivo...');
|
||||
showUploadMessage(
|
||||
context,
|
||||
message,
|
||||
|
@ -103,20 +108,24 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
|||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||
widget.isUploading = false;
|
||||
}
|
||||
if (selectedUploadedFiles.length == selectedMedia.length) {
|
||||
if (selectedUploadedFiles.length ==
|
||||
selectedMedia.length) {
|
||||
setState(() {
|
||||
widget.uploadedFiles = selectedUploadedFiles.first;
|
||||
});
|
||||
widget.onUploadComplete(widget.uploadedFiles!);
|
||||
final message =
|
||||
FFLocalizations.of(context).getVariableText(enText: 'Success!', ptText: 'Sucesso!');
|
||||
final message = FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
enText: 'Success!', ptText: 'Sucesso!');
|
||||
showUploadMessage(context, message);
|
||||
} else {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
final message = FFLocalizations.of(context)
|
||||
.getVariableText(enText: 'Failed to upload data', ptText: 'Falha ao enviar dados');
|
||||
.getVariableText(
|
||||
enText: 'Failed to upload data',
|
||||
ptText: 'Falha ao enviar dados');
|
||||
showUploadMessage(context, message);
|
||||
return;
|
||||
}
|
||||
|
@ -163,13 +172,19 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
|||
'p4ftwxcy',
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: limitedInputTextSize,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -30,7 +30,8 @@ class SubmitButtonUtil extends StatelessWidget {
|
|||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
),
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
|
|
|
@ -41,7 +41,8 @@ class TabViewUtil extends StatelessWidget {
|
|||
fontFamily: FlutterFlowTheme.of(context).titleMediumFamily,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).titleMediumFamily),
|
||||
),
|
||||
unselectedLabelStyle: const TextStyle(),
|
||||
indicatorColor: FlutterFlowTheme.of(context).primary,
|
||||
|
|
|
@ -19,7 +19,8 @@ class AtomTermsOfUse extends StatelessWidget {
|
|||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
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'),
|
||||
|
|
|
@ -2,7 +2,8 @@ import '/flutter_flow/flutter_flow_util.dart';
|
|||
import 'text_field_component_widget.dart' show TextFieldComponentWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TextFieldComponentModel extends FlutterFlowModel<TextFieldComponentWidget> {
|
||||
class TextFieldComponentModel
|
||||
extends FlutterFlowModel<TextFieldComponentWidget> {
|
||||
/// State fields for stateful widgets in this component.
|
||||
|
||||
// State field(s) for TextField widget.
|
||||
|
|
|
@ -20,7 +20,8 @@ class TextFieldComponentWidget extends StatefulWidget {
|
|||
final String? hintTextStrParam;
|
||||
|
||||
@override
|
||||
State<TextFieldComponentWidget> createState() => _TextFieldComponentWidgetState();
|
||||
State<TextFieldComponentWidget> createState() =>
|
||||
_TextFieldComponentWidgetState();
|
||||
}
|
||||
|
||||
class _TextFieldComponentWidgetState extends State<TextFieldComponentWidget> {
|
||||
|
@ -37,7 +38,8 @@ class _TextFieldComponentWidgetState extends State<TextFieldComponentWidget> {
|
|||
super.initState();
|
||||
_model = createModel(context, () => TextFieldComponentModel());
|
||||
|
||||
_model.textController ??= TextEditingController(text: widget.initialValueStrParam);
|
||||
_model.textController ??=
|
||||
TextEditingController(text: widget.initialValueStrParam);
|
||||
_model.textFieldFocusNode ??= FocusNode();
|
||||
}
|
||||
|
||||
|
@ -63,14 +65,16 @@ class _TextFieldComponentWidgetState extends State<TextFieldComponentWidget> {
|
|||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
hintText: widget.hintTextStrParam,
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -105,7 +109,8 @@ class _TextFieldComponentWidgetState extends State<TextFieldComponentWidget> {
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
validator: _model.textControllerValidator.asValidator(context),
|
||||
),
|
||||
|
|
|
@ -3,7 +3,8 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class OptionSelectionModalModel extends FlutterFlowModel<OptionSelectionModalWidget> {
|
||||
class OptionSelectionModalModel
|
||||
extends FlutterFlowModel<OptionSelectionModalWidget> {
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
|
|
|
@ -21,10 +21,12 @@ class OptionSelectionModalWidget extends StatefulWidget {
|
|||
final List<String>? nameListStr;
|
||||
|
||||
@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;
|
||||
|
||||
final animationsMap = <String, AnimationInfo>{};
|
||||
|
@ -90,14 +92,17 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
|||
return GestureDetector(
|
||||
onTap: () async {
|
||||
context.pop();
|
||||
if (widget.routesListStr![optionsListIndex] == 'scheduleCompleteVisitPage') {
|
||||
if (widget.routesListStr![optionsListIndex] ==
|
||||
'scheduleCompleteVisitPage') {
|
||||
// Navegação para a página ScheduleCompleteVisitPage com queryParameters
|
||||
context.go(
|
||||
'/scheduleCompleteVisitPage',
|
||||
extra: {
|
||||
'visitStartDateStr': DateFormat('yyyy-MM-dd HH:mm:ss').format(DateTime.now()),
|
||||
'visitEndDateStr':
|
||||
DateFormat('yyyy-MM-dd HH:mm:ss').format(DateTime.now().add(const Duration(days: 1))),
|
||||
'visitStartDateStr': DateFormat('yyyy-MM-dd HH:mm:ss')
|
||||
.format(DateTime.now()),
|
||||
'visitEndDateStr': DateFormat('yyyy-MM-dd HH:mm:ss')
|
||||
.format(
|
||||
DateTime.now().add(const Duration(days: 1))),
|
||||
},
|
||||
);
|
||||
} else {
|
||||
|
@ -144,20 +149,27 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
|||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
alignment:
|
||||
const AlignmentDirectional(-1.0, 0.0),
|
||||
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(
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
alignment: const AlignmentDirectional(
|
||||
0.0, 0.0),
|
||||
child: Icon(
|
||||
widget.iconsListIcon![optionsListIndex]!,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
widget.iconsListIcon![
|
||||
optionsListIndex]!,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
size: 34.0,
|
||||
),
|
||||
),
|
||||
|
@ -174,16 +186,21 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Text(
|
||||
widget.nameListStr![optionsListIndex],
|
||||
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.titleLarge
|
||||
.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
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.
|
||||
FormFieldController<List<String>>? checkboxGroupValueController;
|
||||
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
||||
set checkboxGroupValues(List<String>? v) => checkboxGroupValueController?.value = v;
|
||||
set checkboxGroupValues(List<String>? v) =>
|
||||
checkboxGroupValueController?.value = v;
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
@ -25,4 +26,4 @@ class OrderFilterModalModel extends FlutterFlowModel<OrderFilterModalWidget> {
|
|||
textFieldFocusNode?.dispose();
|
||||
textController?.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,22 +28,25 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
late Map<String, dynamic> selected;
|
||||
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'
|
||||
},
|
||||
{
|
||||
'title': FFLocalizations.of(navigatorKey.currentContext!).getVariableText(enText: 'Property', ptText: 'Propriedade'),
|
||||
'title': FFLocalizations.of(navigatorKey.currentContext!)
|
||||
.getVariableText(enText: 'Property', ptText: 'Propriedade'),
|
||||
'value': 'PRO'
|
||||
},
|
||||
];
|
||||
final List<Map<String, String>> statusOptions = [
|
||||
{
|
||||
'title': FFLocalizations.of(navigatorKey.currentContext!)
|
||||
.getVariableText(ptText: 'Aguardando Retirada', enText: 'Waiting for Pickup'),
|
||||
'title': FFLocalizations.of(navigatorKey.currentContext!).getVariableText(
|
||||
ptText: 'Aguardando Retirada', enText: 'Waiting for Pickup'),
|
||||
'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'
|
||||
},
|
||||
];
|
||||
|
@ -61,8 +64,12 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
_model = createModel(context, () => OrderFilterModalModel());
|
||||
|
||||
selected = {
|
||||
'adresseeType': widget.defaultAdresseeType == '.*' ? ['MOR', 'PRO'] : [widget.defaultAdresseeType],
|
||||
'status': widget.defaultStatus == '.*' ? ['notPickedUp', 'pickedUp'] : [widget.defaultStatus],
|
||||
'adresseeType': widget.defaultAdresseeType == '.*'
|
||||
? ['MOR', 'PRO']
|
||||
: [widget.defaultAdresseeType],
|
||||
'status': widget.defaultStatus == '.*'
|
||||
? ['notPickedUp', 'pickedUp']
|
||||
: [widget.defaultStatus],
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -92,7 +99,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
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(
|
||||
children: [
|
||||
Row(
|
||||
|
@ -108,7 +116,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: fontsize,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
),
|
||||
|
@ -128,7 +137,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontSize: fontsize,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
),
|
||||
|
@ -156,7 +166,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
width: 5,
|
||||
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,
|
||||
children: [
|
||||
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(
|
||||
FFLocalizations.of(context).getText('yfj9pd6k'), // Filtros
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 18.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineMediumFamily),
|
||||
),
|
||||
FFLocalizations.of(context)
|
||||
.getText('yfj9pd6k'), // Filtros
|
||||
style:
|
||||
FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.headlineMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 18.0,
|
||||
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(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
_buildCheckboxListTile('adresseeType', adresseeTypeOptions, limitedBodyFontSize),
|
||||
_buildCheckboxListTile('status', statusOptions, limitedBodyFontSize),
|
||||
_buildCheckboxListTile('adresseeType',
|
||||
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
|
||||
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;
|
||||
EnumThrowException type;
|
||||
|
@ -23,7 +24,8 @@ class ThrowExceptionWidget extends StatefulWidget {
|
|||
State<ThrowExceptionWidget> createState() => _ThrowExceptionWidgetState();
|
||||
}
|
||||
|
||||
class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with TickerProviderStateMixin {
|
||||
class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
||||
with TickerProviderStateMixin {
|
||||
late ThrowExceptionModel _model;
|
||||
final animationsMap = <String, AnimationInfo>{};
|
||||
|
||||
|
@ -52,11 +54,14 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
|
|||
String _getTitleByType(BuildContext context) {
|
||||
switch (widget.type) {
|
||||
case EnumThrowException.error:
|
||||
return FFLocalizations.of(context).getVariableText(ptText: "Falha :(", enText: "Fail :(");
|
||||
return FFLocalizations.of(context)
|
||||
.getVariableText(ptText: "Falha :(", enText: "Fail :(");
|
||||
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:
|
||||
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
|
||||
Widget build(BuildContext context) {
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedHeaderFontSize =
|
||||
LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
return InkWell(
|
||||
key: const ValueKey('ThrowExceptionWidget'),
|
||||
splashColor: Colors.transparent,
|
||||
|
@ -109,7 +115,8 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
|
|||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
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: Column(
|
||||
|
@ -137,25 +144,28 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
|
|||
Text(
|
||||
_getTitleByType(context),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
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(
|
||||
valueOrDefault<String>(widget.msg, 'Message Not Found'),
|
||||
overflow: TextOverflow.clip,
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
),
|
||||
|
|
|
@ -3,7 +3,8 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class VisitorNotFoundComponentModel extends FlutterFlowModel<VisitorNotFoundComponentWidget> {
|
||||
class VisitorNotFoundComponentModel
|
||||
extends FlutterFlowModel<VisitorNotFoundComponentWidget> {
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
|
|
|
@ -13,10 +13,12 @@ class VisitorNotFoundComponentWidget extends StatefulWidget {
|
|||
|
||||
final String? doc;
|
||||
@override
|
||||
State<VisitorNotFoundComponentWidget> createState() => _VisitorNotFoundComponentWidgetState();
|
||||
State<VisitorNotFoundComponentWidget> createState() =>
|
||||
_VisitorNotFoundComponentWidgetState();
|
||||
}
|
||||
|
||||
class _VisitorNotFoundComponentWidgetState extends State<VisitorNotFoundComponentWidget> {
|
||||
class _VisitorNotFoundComponentWidgetState
|
||||
extends State<VisitorNotFoundComponentWidget> {
|
||||
late VisitorNotFoundComponentModel _model;
|
||||
|
||||
@override
|
||||
|
@ -59,7 +61,8 @@ class _VisitorNotFoundComponentWidgetState extends State<VisitorNotFoundComponen
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||
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(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
|
@ -81,16 +84,19 @@ class _VisitorNotFoundComponentWidgetState extends State<VisitorNotFoundComponen
|
|||
size: 72.0,
|
||||
),
|
||||
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(
|
||||
FFLocalizations.of(context).getText(
|
||||
'1p9mykbj' /* Usuário não encontrado */,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterFlowTheme.of(context).headlineSmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).headlineSmallFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).headlineSmallFamily,
|
||||
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,
|
||||
letterSpacing: 0.0,
|
||||
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));
|
||||
// Navigator.pop(context, value)
|
||||
},
|
||||
text: FFLocalizations.of(context).getVariableText(enText: 'Add', ptText: 'Adicionar'),
|
||||
text: FFLocalizations.of(context)
|
||||
.getVariableText(enText: 'Add', ptText: 'Adicionar'),
|
||||
options: FFButtonOptions(
|
||||
height: 30.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).labelSmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelSmallFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelSmallFamily,
|
||||
color: Colors.white,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelSmallFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelSmallFamily),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
|
|
|
@ -3,7 +3,8 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class BottomArrowLinkedLocalsComponentModel extends FlutterFlowModel<BottomArrowLinkedLocalsComponentWidget> {
|
||||
class BottomArrowLinkedLocalsComponentModel
|
||||
extends FlutterFlowModel<BottomArrowLinkedLocalsComponentWidget> {
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
|
|
|
@ -17,10 +17,12 @@ class BottomArrowLinkedLocalsComponentWidget extends StatefulWidget {
|
|||
ApiCallResponse? response;
|
||||
|
||||
@override
|
||||
State<BottomArrowLinkedLocalsComponentWidget> createState() => _BottomArrowLinkedLocalsComponentWidgetState();
|
||||
State<BottomArrowLinkedLocalsComponentWidget> createState() =>
|
||||
_BottomArrowLinkedLocalsComponentWidgetState();
|
||||
}
|
||||
|
||||
class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLinkedLocalsComponentWidget> {
|
||||
class _BottomArrowLinkedLocalsComponentWidgetState
|
||||
extends State<BottomArrowLinkedLocalsComponentWidget> {
|
||||
late BottomArrowLinkedLocalsComponentModel _model;
|
||||
|
||||
bool _loading = false;
|
||||
|
@ -38,7 +40,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
|||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => BottomArrowLinkedLocalsComponentModel());
|
||||
_model =
|
||||
createModel(context, () => BottomArrowLinkedLocalsComponentModel());
|
||||
_localsFuture = _fetchLocals();
|
||||
}
|
||||
|
||||
|
@ -104,10 +107,14 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
|||
if (isEnabled) {
|
||||
final local = locals[0];
|
||||
|
||||
await StorageHelper().set(ProfileStorageKey.clientName.key, local['CLI_NOME']);
|
||||
await StorageHelper().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']);
|
||||
await StorageHelper()
|
||||
.set(ProfileStorageKey.clientName.key, local['CLI_NOME']);
|
||||
await StorageHelper()
|
||||
.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();
|
||||
return widget.response;
|
||||
|
@ -131,7 +138,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
|||
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);
|
||||
}
|
||||
|
||||
|
@ -141,18 +149,25 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
|||
var response = await PhpGroup.resopndeVinculo.call(tarefa: status);
|
||||
|
||||
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 {
|
||||
await StorageHelper().set(ProfileStorageKey.clientUUID.key, '');
|
||||
return response.jsonBody;
|
||||
}
|
||||
} catch (e, s) {
|
||||
await DialogUtil.errorDefault(context);
|
||||
LogUtil.requestAPIFailed('responderVinculo.php', '', 'Responder Vínculo', e, s);
|
||||
LogUtil.requestAPIFailed(
|
||||
'responderVinculo.php', '', 'Responder Vínculo', e, s);
|
||||
return {
|
||||
'error': true,
|
||||
'error_msg': FFLocalizations.of(context)
|
||||
.getVariableText(ptText: "Falha ao efetuar operação, Tente Novamente mais tarde.", enText: "Failed to perform operation, please try again later.")
|
||||
'error_msg': FFLocalizations.of(context).getVariableText(
|
||||
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) {
|
||||
return Map<String, String>.from(
|
||||
{'${local['CLI_PREFIXO']}:': local['CLI_NOME'], '${FFLocalizations.of(context).getVariableText(ptText: 'Propriedade', enText: 'Property')}:': local['CLU_OWNER_DSC']});
|
||||
return Map<String, String>.from({
|
||||
'${local['CLI_PREFIXO']}:': local['CLI_NOME'],
|
||||
'${FFLocalizations.of(context).getVariableText(ptText: 'Propriedade', enText: 'Property')}:':
|
||||
local['CLU_OWNER_DSC']
|
||||
});
|
||||
}
|
||||
|
||||
Map<String, Color> _statusHashMap(dynamic local) {
|
||||
return Map<String, Color>.from({
|
||||
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')
|
||||
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
|
||||
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)],
|
||||
onTapCardItemAction: () async {
|
||||
if (local['CLU_STATUS'] == 'A') {
|
||||
await StorageHelper().set(ProfileStorageKey.clientUUID.key, local['CLI_ID']);
|
||||
await StorageHelper().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']);
|
||||
await StorageHelper()
|
||||
.set(ProfileStorageKey.clientUUID.key, local['CLI_ID']);
|
||||
await StorageHelper()
|
||||
.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);
|
||||
return true;
|
||||
} else if (local['CLU_STATUS'] == 'B') {
|
||||
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',
|
||||
);
|
||||
|
||||
|
@ -209,8 +238,11 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
|||
String localName = local['CLI_NOME'];
|
||||
showAlertDialog(
|
||||
context,
|
||||
FFLocalizations.of(context).getVariableText(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?'),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
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 {
|
||||
var response = await _fetchResponseLink('A', local['CLI_ID']);
|
||||
context.pop();
|
||||
|
@ -263,7 +295,9 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
|||
width: double.infinity,
|
||||
height: height - (height * 0.5),
|
||||
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(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
|
@ -275,12 +309,16 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
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)),
|
||||
if (_loading == true)
|
||||
Container(
|
||||
|
@ -297,7 +335,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
|||
padding: const EdgeInsets.only(top: 10),
|
||||
child: Center(
|
||||
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,
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
)))),
|
||||
|
|
|
@ -7,7 +7,8 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
|||
// ignore: unused_import
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class ScheduleVisitDetailModel extends FlutterFlowModel<ScheduleVisitDetailWidget> {
|
||||
class ScheduleVisitDetailModel
|
||||
extends FlutterFlowModel<ScheduleVisitDetailWidget> {
|
||||
late final String devUUID;
|
||||
late final String userUUID;
|
||||
late final String cliUUID;
|
||||
|
@ -37,7 +38,8 @@ class ScheduleVisitDetailModel extends FlutterFlowModel<ScheduleVisitDetailWidge
|
|||
DateFormat originalFormat = DateFormat('d/M/y 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';
|
||||
}
|
||||
|
||||
|
@ -57,8 +59,10 @@ class ScheduleVisitDetailModel extends FlutterFlowModel<ScheduleVisitDetailWidge
|
|||
|
||||
Future<void> initDB() async {
|
||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
cliUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -35,7 +35,8 @@ class ScheduleVisitDetailWidget extends StatefulWidget {
|
|||
final String? visitObsStr;
|
||||
|
||||
@override
|
||||
State<ScheduleVisitDetailWidget> createState() => _ScheduleVisitDetailWidgetState();
|
||||
State<ScheduleVisitDetailWidget> createState() =>
|
||||
_ScheduleVisitDetailWidgetState();
|
||||
}
|
||||
|
||||
class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||
|
@ -57,16 +58,19 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
_model.textController1 ??= TextEditingController(text: widget.visitTempStr);
|
||||
_model.textFieldFocusNode1 ??= FocusNode();
|
||||
|
||||
_model.textController2 ??= TextEditingController(text: widget.visitStartDate);
|
||||
_model.textController2 ??=
|
||||
TextEditingController(text: widget.visitStartDate);
|
||||
_model.textFieldFocusNode2 ??= FocusNode();
|
||||
|
||||
_model.textController3 ??= TextEditingController(text: widget.visitEndDate);
|
||||
_model.textFieldFocusNode3 ??= FocusNode();
|
||||
|
||||
_model.textController4 ??= TextEditingController(text: extractDescToStr(widget.visitResonStr!));
|
||||
_model.textController4 ??=
|
||||
TextEditingController(text: extractDescToStr(widget.visitResonStr!));
|
||||
_model.textFieldFocusNode4 ??= FocusNode();
|
||||
|
||||
_model.textController5 ??= TextEditingController(text: extractDescToStr(widget.visitLevelStr!));
|
||||
_model.textController5 ??=
|
||||
TextEditingController(text: extractDescToStr(widget.visitLevelStr!));
|
||||
_model.textFieldFocusNode5 ??= FocusNode();
|
||||
|
||||
_model.textController6 ??= TextEditingController(text: widget.visitObsStr);
|
||||
|
@ -128,11 +132,13 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
),
|
||||
),
|
||||
child: Visibility(
|
||||
visible: widget.visitorStrList != null && widget.visitorStrList != '',
|
||||
visible: widget.visitorStrList != null &&
|
||||
widget.visitorStrList != '',
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
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(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
|
@ -155,7 +161,8 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
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(
|
||||
width: 100.0,
|
||||
child: ClipRRect(
|
||||
|
@ -183,7 +190,8 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
Container(
|
||||
decoration: const BoxDecoration(),
|
||||
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(
|
||||
controller: _model.textController1,
|
||||
focusNode: _model.textFieldFocusNode1,
|
||||
|
@ -195,17 +203,31 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'7w4fohoa' /* Encerramento da Visita */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -236,24 +258,32 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
validator: _model.textController1Validator.asValidator(context),
|
||||
validator: _model.textController1Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
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(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
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(
|
||||
controller: _model.textController2,
|
||||
focusNode: _model.textFieldFocusNode2,
|
||||
|
@ -262,68 +292,98 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
readOnly: true,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getVariableText(
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
enText: 'Start',
|
||||
ptText: 'Início',
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
hintText:
|
||||
FFLocalizations.of(context).getText(
|
||||
'0cp1e31d' /* dd/mm/yyyy */,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontSize: 12,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
validator: _model.textController2Validator.asValidator(context),
|
||||
validator: _model.textController2Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
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(
|
||||
controller: _model.textController3,
|
||||
focusNode: _model.textFieldFocusNode3,
|
||||
|
@ -332,61 +392,90 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
readOnly: true,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
labelText:
|
||||
FFLocalizations.of(context).getText(
|
||||
'abppdgz3' /* Término */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
hintText:
|
||||
FFLocalizations.of(context).getText(
|
||||
'kqralft4' /* dd/mm/yyyy */,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontSize: 12,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
validator: _model.textController3Validator.asValidator(context),
|
||||
validator: _model.textController3Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -394,14 +483,16 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
),
|
||||
),
|
||||
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(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
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(
|
||||
controller: _model.textController4,
|
||||
focusNode: _model.textFieldFocusNode4,
|
||||
|
@ -410,66 +501,96 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
readOnly: true,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
labelText:
|
||||
FFLocalizations.of(context).getText(
|
||||
'xjxhzqqm' /* Motivo da Visita */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
hintText:
|
||||
FFLocalizations.of(context).getText(
|
||||
'47oezdm6' /* Motivo */,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
validator: _model.textController4Validator.asValidator(context),
|
||||
validator: _model.textController4Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
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(
|
||||
controller: _model.textController5,
|
||||
focusNode: _model.textFieldFocusNode5,
|
||||
|
@ -478,60 +599,89 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
readOnly: true,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
labelText:
|
||||
FFLocalizations.of(context).getText(
|
||||
'2ujg7u18' /* Nível de Acesso */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
hintText:
|
||||
FFLocalizations.of(context).getText(
|
||||
'3emmbbfv' /* Nível de Acesso */,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
validator: _model.textController5Validator.asValidator(context),
|
||||
validator: _model.textController5Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -541,7 +691,8 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
Container(
|
||||
decoration: const BoxDecoration(),
|
||||
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(
|
||||
controller: _model.textController6,
|
||||
focusNode: _model.textFieldFocusNode6,
|
||||
|
@ -553,17 +704,31 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'ritce5uw' /* Observações da Visita */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -594,12 +759,18 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
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(
|
||||
onPressed: () async {
|
||||
_model.postScheduleVisit = await PhpGroup.postScheduleVisitCall.call(
|
||||
_model.postScheduleVisit =
|
||||
await PhpGroup.postScheduleVisitCall.call(
|
||||
devDesc: widget.visitObsStr,
|
||||
idVisitante: widget.visitorStrList,
|
||||
dtInicio: _model.convertDateFormat(widget.visitStartDate ?? ''),
|
||||
dtInicio:
|
||||
_model.convertDateFormat(widget.visitStartDate ?? ''),
|
||||
dtFim: _model.convertDateFormat(widget.visitEndDate ?? ''),
|
||||
unica: widget.visitTempStr,
|
||||
idMotivo: extractIdToStr(widget.visitResonStr!),
|
||||
|
@ -629,7 +802,8 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
final String? msg = PhpGroup.postScheduleVisitCall.errorMsg(
|
||||
(_model.postScheduleVisit?.jsonBody ?? ''),
|
||||
);
|
||||
await DialogUtil.error(context, msg!).then((value) => safeSetState(() {}));
|
||||
await DialogUtil.error(context, msg!)
|
||||
.then((value) => safeSetState(() {}));
|
||||
}
|
||||
|
||||
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/flutter_flow/flutter_flow_model.dart';
|
||||
|
||||
class UpArrowLinkedLocalsComponentModel extends FlutterFlowModel<UpArrowLinkedLocalsComponentWidget> {
|
||||
class UpArrowLinkedLocalsComponentModel
|
||||
extends FlutterFlowModel<UpArrowLinkedLocalsComponentWidget> {
|
||||
late final String devUUID;
|
||||
late final String userUUID;
|
||||
late final String cliUUID;
|
||||
|
@ -16,9 +17,12 @@ class UpArrowLinkedLocalsComponentModel extends FlutterFlowModel<UpArrowLinkedLo
|
|||
|
||||
Future<void> initDB() async {
|
||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
cliName = (await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? '';
|
||||
userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
cliUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
cliName =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientName.key)) ?? '';
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -12,10 +12,12 @@ class UpArrowLinkedLocalsComponentWidget extends StatefulWidget {
|
|||
const UpArrowLinkedLocalsComponentWidget({super.key});
|
||||
|
||||
@override
|
||||
State<UpArrowLinkedLocalsComponentWidget> createState() => _UpArrowLinkedLocalsComponentWidgetState();
|
||||
State<UpArrowLinkedLocalsComponentWidget> createState() =>
|
||||
_UpArrowLinkedLocalsComponentWidgetState();
|
||||
}
|
||||
|
||||
class _UpArrowLinkedLocalsComponentWidgetState extends State<UpArrowLinkedLocalsComponentWidget> {
|
||||
class _UpArrowLinkedLocalsComponentWidgetState
|
||||
extends State<UpArrowLinkedLocalsComponentWidget> {
|
||||
late UpArrowLinkedLocalsComponentModel _model;
|
||||
|
||||
@override
|
||||
|
@ -105,7 +107,8 @@ class _UpArrowLinkedLocalsComponentWidgetState extends State<UpArrowLinkedLocals
|
|||
|
||||
return GridView.builder(
|
||||
padding: EdgeInsets.zero,
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 1,
|
||||
crossAxisSpacing: 10.0,
|
||||
mainAxisSpacing: 0.0,
|
||||
|
@ -114,7 +117,8 @@ class _UpArrowLinkedLocalsComponentWidgetState extends State<UpArrowLinkedLocals
|
|||
scrollDirection: Axis.horizontal,
|
||||
itemCount: eachLocals.length,
|
||||
itemBuilder: (context, eachLocalsIndex) {
|
||||
final eachLocalsItem = eachLocals[eachLocalsIndex];
|
||||
final eachLocalsItem =
|
||||
eachLocals[eachLocalsIndex];
|
||||
return InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
|
@ -137,58 +141,82 @@ class _UpArrowLinkedLocalsComponentWidgetState extends State<UpArrowLinkedLocals
|
|||
width: 50.0,
|
||||
height: double.infinity,
|
||||
decoration: const BoxDecoration(),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
borderRadius: const BorderRadius.only(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
borderRadius:
|
||||
const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(25.0),
|
||||
bottomRight: Radius.circular(25.0),
|
||||
bottomRight:
|
||||
Radius.circular(25.0),
|
||||
topLeft: Radius.circular(25.0),
|
||||
topRight: Radius.circular(25.0),
|
||||
),
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.secondaryText,
|
||||
width: 3.0,
|
||||
),
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: const BorderRadius.only(
|
||||
borderRadius:
|
||||
const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(25.0),
|
||||
bottomRight: Radius.circular(25.0),
|
||||
bottomRight:
|
||||
Radius.circular(25.0),
|
||||
topLeft: Radius.circular(25.0),
|
||||
topRight: Radius.circular(25.0),
|
||||
),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: "https://freaccess.com.br/freaccess/Images/Clients/${getJsonField(
|
||||
imageUrl:
|
||||
"https://freaccess.com.br/freaccess/Images/Clients/${getJsonField(
|
||||
eachLocalsItem,
|
||||
r'''$.CLI_ID''',
|
||||
).toString()}.png",
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
fit: BoxFit.fill,
|
||||
alignment: const Alignment(0.0, 0.0),
|
||||
alignment:
|
||||
const Alignment(0.0, 0.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
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(
|
||||
getJsonField(
|
||||
eachLocalsItem,
|
||||
r'''$.CLI_NOME''',
|
||||
).toString(),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
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 '/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 userUUID;
|
||||
late final String cliUUID;
|
||||
|
@ -31,8 +33,10 @@ class AccessNotificationModalTemplateComponentModel extends FlutterFlowModel<Acc
|
|||
|
||||
Future<void> initDB() async {
|
||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
cliUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -41,7 +41,8 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
|||
void initState() {
|
||||
super.initState();
|
||||
|
||||
_model = createModel(context, () => AccessNotificationModalTemplateComponentModel());
|
||||
_model = createModel(
|
||||
context, () => AccessNotificationModalTemplateComponentModel());
|
||||
|
||||
_model.textController1 ??= TextEditingController(text: widget.name);
|
||||
_model.textFieldFocusNode1 ??= FocusNode();
|
||||
|
@ -65,9 +66,11 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
|||
|
||||
@override
|
||||
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(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
|
@ -110,10 +113,13 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
|||
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: 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(
|
||||
controller: _model.textController1,
|
||||
focusNode: _model.textFieldFocusNode1,
|
||||
|
@ -126,19 +132,25 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'dvag09pq' /* Nome */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
@ -150,16 +162,18 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
keyboardType: TextInputType.name,
|
||||
validator: _model.textController1Validator.asValidator(context),
|
||||
validator:
|
||||
_model.textController1Validator.asValidator(context),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
|
@ -167,8 +181,10 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
|||
children: [
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
controller:
|
||||
TextEditingController(text: widget.type == 'O' ? labelTypeResident : labelTypeVisitor),
|
||||
controller: TextEditingController(
|
||||
text: widget.type == 'O'
|
||||
? labelTypeResident
|
||||
: labelTypeVisitor),
|
||||
focusNode: _model.textFieldFocusNode2,
|
||||
autofocus: false,
|
||||
textInputAction: TextInputAction.next,
|
||||
|
@ -179,19 +195,27 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'h3s0r1he' /* Tipo */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
@ -203,22 +227,28 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
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: 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(
|
||||
controller: _model.textController3,
|
||||
focusNode: _model.textFieldFocusNode3,
|
||||
|
@ -231,19 +261,25 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'jveeqpdz' /* Acesso */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
@ -255,20 +291,23 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
keyboardType: TextInputType.name,
|
||||
validator: _model.textController3Validator.asValidator(context),
|
||||
validator:
|
||||
_model.textController3Validator.asValidator(context),
|
||||
),
|
||||
),
|
||||
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(
|
||||
controller: _model.textController4,
|
||||
focusNode: _model.textFieldFocusNode4,
|
||||
|
@ -283,18 +322,24 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
|||
enText: 'Access Sector',
|
||||
ptText: 'Setor de Acesso',
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
@ -306,14 +351,16 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
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 'card_item_template_component_widget.dart' show CardItemTemplateComponentWidget;
|
||||
import 'card_item_template_component_widget.dart'
|
||||
show CardItemTemplateComponentWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CardItemTemplateComponentModel extends FlutterFlowModel<CardItemTemplateComponentWidget> {
|
||||
class CardItemTemplateComponentModel
|
||||
extends FlutterFlowModel<CardItemTemplateComponentWidget> {
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
|
|
|
@ -27,10 +27,12 @@ class CardItemTemplateComponentWidget extends StatefulWidget {
|
|||
final Future Function()? onTapCardItemAction;
|
||||
|
||||
@override
|
||||
State<CardItemTemplateComponentWidget> createState() => _CardItemTemplateComponentWidgetState();
|
||||
State<CardItemTemplateComponentWidget> createState() =>
|
||||
_CardItemTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateComponentWidget> {
|
||||
class _CardItemTemplateComponentWidgetState
|
||||
extends State<CardItemTemplateComponentWidget> {
|
||||
late CardItemTemplateComponentModel _model;
|
||||
late LinkedHashMap<String, String> labelsLinkedHashMap;
|
||||
late List<LinkedHashMap<String, Color>> statusLinkedHashMap;
|
||||
|
@ -40,7 +42,9 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
|||
super.initState();
|
||||
_model = createModel(context, () => CardItemTemplateComponentModel());
|
||||
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
|
||||
|
@ -70,7 +74,8 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedBodyTextSize,
|
||||
),
|
||||
|
@ -85,7 +90,8 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
|||
fontSize: limitedBodyTextSize,
|
||||
letterSpacing: 0.0,
|
||||
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,
|
||||
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(),
|
||||
].addToEnd(const SizedBox(width: 10)).addToStart(const SizedBox(width: 10)),
|
||||
]
|
||||
.addToEnd(const SizedBox(width: 10))
|
||||
.addToStart(const SizedBox(width: 10)),
|
||||
);
|
||||
} else {
|
||||
return Column(
|
||||
|
|
|
@ -2,7 +2,8 @@ import '/flutter_flow/flutter_flow_util.dart';
|
|||
import 'change_pass_widget.dart' show PassKeyTemplateWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PassKeyTemplateComponentModel extends FlutterFlowModel<PassKeyTemplateWidget> {
|
||||
class PassKeyTemplateComponentModel
|
||||
extends FlutterFlowModel<PassKeyTemplateWidget> {
|
||||
/// State fields for stateful widgets in this component.
|
||||
|
||||
final formKey = GlobalKey<FormState>();
|
||||
|
@ -15,7 +16,8 @@ class PassKeyTemplateComponentModel extends FlutterFlowModel<PassKeyTemplateWidg
|
|||
late bool keyTextFieldVisibility2;
|
||||
String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator1;
|
||||
String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator2;
|
||||
String? _keyTextFieldTextControllerValidator(BuildContext context, String? val) {
|
||||
String? _keyTextFieldTextControllerValidator(
|
||||
BuildContext context, String? val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return FFLocalizations.of(context).getVariableText(
|
||||
enText: 'This field is required',
|
||||
|
|
|
@ -48,7 +48,8 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
|||
}
|
||||
|
||||
Future<void> _initialize() async {
|
||||
_accessPass = await StorageHelper().get(SecureStorageKey.accessPass.value) ?? '';
|
||||
_accessPass =
|
||||
await StorageHelper().get(SecureStorageKey.accessPass.value) ?? '';
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -89,7 +90,8 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
|||
tablet: false,
|
||||
))
|
||||
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(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
|
@ -102,7 +104,8 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
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(
|
||||
Icons.arrow_back_rounded,
|
||||
color: Color(0xFF15161E),
|
||||
|
@ -110,17 +113,20 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
|||
),
|
||||
),
|
||||
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(
|
||||
'',
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
style:
|
||||
FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -128,11 +134,13 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
|||
),
|
||||
),
|
||||
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(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'INSERT PASSWORD',
|
||||
ptText: _accessPass != '' ? 'ALTERAR SENHA' : 'ADICIONAR SENHA',
|
||||
ptText:
|
||||
_accessPass != '' ? 'ALTERAR SENHA' : 'ADICIONAR SENHA',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Outfit',
|
||||
|
@ -145,16 +153,20 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
|||
),
|
||||
),
|
||||
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(
|
||||
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(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -164,7 +176,8 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
|||
child: Column(
|
||||
children: [
|
||||
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(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
|
@ -183,29 +196,36 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
|||
obscureText: !_model.keyTextFieldVisibility1,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getVariableText(
|
||||
labelText:
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Senha',
|
||||
enText: 'Password',
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Digite a sua senha.....',
|
||||
enText: 'Enter your password.....',
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -236,15 +256,20 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
|||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
contentPadding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0),
|
||||
fillColor:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
contentPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 24.0, 20.0, 24.0),
|
||||
suffixIcon: InkWell(
|
||||
onTap: () => setState(
|
||||
() => _model.keyTextFieldVisibility1 = !_model.keyTextFieldVisibility1,
|
||||
() => _model.keyTextFieldVisibility1 =
|
||||
!_model.keyTextFieldVisibility1,
|
||||
),
|
||||
focusNode: FocusNode(skipTraversal: true),
|
||||
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,
|
||||
size: 22.0,
|
||||
),
|
||||
|
@ -256,14 +281,20 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
|||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
maxLength: 4,
|
||||
maxLengthEnforcement: MaxLengthEnforcement.enforced,
|
||||
buildCounter: (context, {required currentLength, required isFocused, maxLength}) => null,
|
||||
buildCounter: (context,
|
||||
{required currentLength,
|
||||
required isFocused,
|
||||
maxLength}) =>
|
||||
null,
|
||||
keyboardType: TextInputType.number,
|
||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||
validator: _model.keyTextFieldTextControllerValidator1.asValidator(context),
|
||||
validator: _model.keyTextFieldTextControllerValidator1
|
||||
.asValidator(context),
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||
LengthLimitingTextInputFormatter(4),
|
||||
|
@ -277,14 +308,18 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
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(
|
||||
onPressed: () async {
|
||||
if (_model.formKey.currentState == null || !_model.formKey.currentState!.validate()) {
|
||||
if (_model.formKey.currentState == null ||
|
||||
!_model.formKey.currentState!.validate()) {
|
||||
return;
|
||||
}
|
||||
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);
|
||||
context.pop(true);
|
||||
|
@ -296,8 +331,10 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
|||
options: FFButtonOptions(
|
||||
width: 270.0,
|
||||
height: 50.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: const Color(0xFF1AAB5F),
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
|
@ -305,7 +342,8 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
|||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
|
|
|
@ -31,10 +31,13 @@ class DetailsComponentWidget extends StatefulWidget {
|
|||
class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||
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 =>
|
||||
widget.statusHashMap.map((map) => LinkedHashMap<String, Color>.from(map ?? {})).toList();
|
||||
widget.statusHashMap
|
||||
.map((map) => LinkedHashMap<String, Color>.from(map ?? {}))
|
||||
.toList();
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
|
@ -59,7 +62,8 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// CachedNetworkImage.evictFromCache(widget.imagePath ?? '');
|
||||
final double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
final double limitedBodyFontSize =
|
||||
LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
return Container(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: MediaQuery.of(context).size.width,
|
||||
|
@ -94,7 +98,8 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
SizedBox(height: MediaQuery.of(context).size.height * 0.03),
|
||||
Row(
|
||||
children: statusLinkedHashMap.expand((linkedHashMap) {
|
||||
return linkedHashMap.entries.map((MapEntry<String, Color> item) {
|
||||
return linkedHashMap.entries
|
||||
.map((MapEntry<String, Color> item) {
|
||||
return Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
|
@ -116,22 +121,30 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
filled: true,
|
||||
fillColor: item.value,
|
||||
labelText: item.key,
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
|
@ -144,7 +157,8 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
|
@ -155,7 +169,8 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
textAlign: TextAlign.center,
|
||||
maxLines: null,
|
||||
keyboardType: TextInputType.name,
|
||||
validator: _model.textController1Validator.asValidator(context),
|
||||
validator: _model.textController1Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -175,7 +190,8 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
readOnly: true,
|
||||
initialValue: '$value',
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
|
@ -190,19 +206,26 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
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(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
|
@ -212,25 +235,29 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground, // Change border color here
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground, // Change border color here
|
||||
),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground, // Change border color here
|
||||
),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
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 '/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';
|
||||
|
||||
class ForgotPasswordTemplateComponentModel extends FlutterFlowModel<ForgotPasswordTemplateComponentWidget> {
|
||||
class ForgotPasswordTemplateComponentModel
|
||||
extends FlutterFlowModel<ForgotPasswordTemplateComponentWidget> {
|
||||
/// State fields for stateful widgets in this component.
|
||||
|
||||
final formKey = GlobalKey<FormState>();
|
||||
|
@ -13,7 +15,8 @@ class ForgotPasswordTemplateComponentModel extends FlutterFlowModel<ForgotPasswo
|
|||
FocusNode? emailAddressFocusNode;
|
||||
TextEditingController? emailAddressTextController;
|
||||
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
|
||||
String? _emailAddressTextControllerValidator(BuildContext context, String? val) {
|
||||
String? _emailAddressTextControllerValidator(
|
||||
BuildContext context, String? val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return FFLocalizations.of(context).getText(
|
||||
'snnmkbyc' /* E-mail é Obrigatório */,
|
||||
|
|
|
@ -19,10 +19,12 @@ class ForgotPasswordTemplateComponentWidget extends StatefulWidget {
|
|||
const ForgotPasswordTemplateComponentWidget({super.key});
|
||||
|
||||
@override
|
||||
State<ForgotPasswordTemplateComponentWidget> createState() => _ForgotPasswordTemplateComponentWidgetState();
|
||||
State<ForgotPasswordTemplateComponentWidget> createState() =>
|
||||
_ForgotPasswordTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTemplateComponentWidget> {
|
||||
class _ForgotPasswordTemplateComponentWidgetState
|
||||
extends State<ForgotPasswordTemplateComponentWidget> {
|
||||
late ForgotPasswordTemplateComponentModel _model;
|
||||
|
||||
@override
|
||||
|
@ -49,9 +51,11 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
double limitedSubHeaderFontSize =
|
||||
LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedHeaderFontSize =
|
||||
LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
|
@ -83,7 +87,8 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
tablet: false,
|
||||
))
|
||||
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(
|
||||
key: const ValueKey<String>('BackButton'),
|
||||
splashColor: Colors.transparent,
|
||||
|
@ -97,7 +102,8 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
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(
|
||||
Icons.arrow_back_rounded,
|
||||
color: Color(0xFF15161E),
|
||||
|
@ -105,16 +111,20 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
),
|
||||
),
|
||||
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(
|
||||
'',
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -123,30 +133,36 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
),
|
||||
),
|
||||
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(
|
||||
FFLocalizations.of(context).getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
|
||||
FFLocalizations.of(context)
|
||||
.getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Outfit',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Outfit'),
|
||||
),
|
||||
),
|
||||
),
|
||||
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(
|
||||
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(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
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,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
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(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
|
@ -171,15 +188,18 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getText('mtz8l7ft' /* E-mail */),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getText('mtz8l7ft' /* E-mail */),
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.black,
|
||||
|
@ -208,7 +228,8 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
),
|
||||
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(
|
||||
Icons.email,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
|
@ -221,12 +242,14 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
maxLines: null,
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||
validator: _model.emailAddressTextControllerValidator.asValidator(context),
|
||||
validator: _model.emailAddressTextControllerValidator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -234,12 +257,17 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
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(
|
||||
key: const ValueKey<String>('SendButtonWidget'),
|
||||
onPressed: (_model.emailAddressTextController.text == '' || !ValidatorUtil.isValidEmail(_model.emailAddressTextController.text))
|
||||
onPressed: (_model.emailAddressTextController.text ==
|
||||
'' ||
|
||||
!ValidatorUtil.isValidEmail(
|
||||
_model.emailAddressTextController.text))
|
||||
? null
|
||||
: () async => await AuthenticationService.forgotPassword(
|
||||
: () async =>
|
||||
await AuthenticationService.forgotPassword(
|
||||
context,
|
||||
_model.emailAddressTextController.text,
|
||||
).then((v) => v == true ? context.pop() : null),
|
||||
|
@ -249,23 +277,28 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
options: FFButtonOptions(
|
||||
width: 270.0,
|
||||
height: 50.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
textStyle:
|
||||
FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||
disabledColor:
|
||||
FlutterFlowTheme.of(context).customColor5,
|
||||
disabledTextColor: Colors.white,
|
||||
),
|
||||
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/flutter_flow/flutter_flow_model.dart';
|
||||
|
||||
class LiberationHistoryItemDetailsTemplateComponentModel extends FlutterFlowModel<LiberationHistoryItemDetailsTemplateComponentWidget> {
|
||||
class LiberationHistoryItemDetailsTemplateComponentModel
|
||||
extends FlutterFlowModel<
|
||||
LiberationHistoryItemDetailsTemplateComponentWidget> {
|
||||
late final String devUUID;
|
||||
late final String userUUID;
|
||||
late final String cliUUID;
|
||||
|
@ -26,8 +28,10 @@ class LiberationHistoryItemDetailsTemplateComponentModel extends FlutterFlowMode
|
|||
|
||||
Future<void> initDatabase() async {
|
||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
userUUID =
|
||||
(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_util.dart';
|
||||
|
||||
class LiberationHistoryItemDetailsTemplateComponentWidget extends StatefulWidget {
|
||||
class LiberationHistoryItemDetailsTemplateComponentWidget
|
||||
extends StatefulWidget {
|
||||
const LiberationHistoryItemDetailsTemplateComponentWidget({
|
||||
super.key,
|
||||
required this.name,
|
||||
|
@ -39,7 +40,8 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
|||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => LiberationHistoryItemDetailsTemplateComponentModel());
|
||||
_model = createModel(
|
||||
context, () => LiberationHistoryItemDetailsTemplateComponentModel());
|
||||
|
||||
_model.textController1 ??= TextEditingController(text: widget.name);
|
||||
_model.textFieldFocusNode1 ??= FocusNode();
|
||||
|
@ -104,10 +106,13 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
|||
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: 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(
|
||||
controller: _model.textController1,
|
||||
focusNode: _model.textFieldFocusNode1,
|
||||
|
@ -120,19 +125,25 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'dmazrriq' /* Nome */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
@ -144,16 +155,18 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
keyboardType: TextInputType.name,
|
||||
validator: _model.textController1Validator.asValidator(context),
|
||||
validator:
|
||||
_model.textController1Validator.asValidator(context),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
|
@ -172,19 +185,27 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'xx3ivbr4' /* Tipo */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
@ -196,22 +217,28 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
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: 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(
|
||||
controller: _model.textController3,
|
||||
focusNode: _model.textFieldFocusNode3,
|
||||
|
@ -224,19 +251,25 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'rhheok7k' /* Acesso */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
@ -248,20 +281,23 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
keyboardType: TextInputType.name,
|
||||
validator: _model.textController3Validator.asValidator(context),
|
||||
validator:
|
||||
_model.textController3Validator.asValidator(context),
|
||||
),
|
||||
),
|
||||
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(
|
||||
controller: _model.textController4,
|
||||
focusNode: _model.textFieldFocusNode4,
|
||||
|
@ -275,18 +311,24 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'w3tciqlv' /* Acionamento */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
@ -298,14 +340,16 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
validator: _model.textController4Validator.asValidator(context),
|
||||
validator:
|
||||
_model.textController4Validator.asValidator(context),
|
||||
),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -37,7 +37,8 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => MessageNotificationModalTemplateComponentModel());
|
||||
_model = createModel(
|
||||
context, () => MessageNotificationModalTemplateComponentModel());
|
||||
|
||||
_model.textController1 ??= TextEditingController(text: widget.message);
|
||||
_model.textFieldFocusNode1 ??= FocusNode();
|
||||
|
@ -59,7 +60,8 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
double limitedSubHeaderFontSize =
|
||||
LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
|
||||
return Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
|
@ -79,7 +81,8 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
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(
|
||||
controller: _model.textController1,
|
||||
focusNode: _model.textFieldFocusNode1,
|
||||
|
@ -94,17 +97,21 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
enText: 'Message',
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
|
@ -120,7 +127,8 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
|
@ -146,20 +154,26 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
ptText: 'De',
|
||||
enText: 'From',
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
|
@ -172,22 +186,27 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
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: 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(
|
||||
controller: _model.textController3,
|
||||
focusNode: _model.textFieldFocusNode3,
|
||||
|
@ -202,17 +221,21 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
enText: 'To',
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
enabledBorder: InputBorder.none,
|
||||
|
@ -228,7 +251,8 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
|
|
|
@ -6,7 +6,8 @@ import 'package:hub/features/backend/index.dart';
|
|||
import 'package:hub/features/storage/index.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
|
||||
class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisionalVisitPageWidget> {
|
||||
class ScheduleProvisionalVisitPageModel
|
||||
extends FlutterFlowModel<ScheduleProvisionalVisitPageWidget> {
|
||||
String cliUUID = '';
|
||||
String devUUID = '';
|
||||
String userUUID = '';
|
||||
|
@ -20,21 +21,25 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisi
|
|||
void addToVisitors(dynamic item) => visitors.add(item);
|
||||
void removeFromVisitors(dynamic item) => visitors.remove(item);
|
||||
void removeAtIndexFromVisitors(int index) => visitors.removeAt(index);
|
||||
void insertAtIndexInVisitors(int index, dynamic item) => visitors.insert(index, item);
|
||||
void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) => visitors[index] = updateFn(visitors[index]);
|
||||
void insertAtIndexInVisitors(int index, dynamic item) =>
|
||||
visitors.insert(index, item);
|
||||
void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) =>
|
||||
visitors[index] = updateFn(visitors[index]);
|
||||
|
||||
List<String> docs = [];
|
||||
void addToDocs(String item) => docs.add(item);
|
||||
void removeFromDocs(String item) => docs.remove(item);
|
||||
void removeAtIndexFromDocs(int index) => docs.removeAt(index);
|
||||
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>();
|
||||
FocusNode? personNameFocusNode;
|
||||
TextEditingController? personNameTextController;
|
||||
String? Function(BuildContext, String?)? personNameTextControllerValidator;
|
||||
String? _personNameTextControllerValidator(BuildContext context, String? val) {
|
||||
String? _personNameTextControllerValidator(
|
||||
BuildContext context, String? val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return FFLocalizations.of(context).getText('3hqg8buh');
|
||||
}
|
||||
|
@ -55,9 +60,11 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisi
|
|||
}
|
||||
DateTime selectedDateTime;
|
||||
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 {
|
||||
selectedDateTime = DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
||||
selectedDateTime =
|
||||
DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
||||
} catch (e) {
|
||||
return FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Formato de data inválido',
|
||||
|
@ -87,7 +94,9 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisi
|
|||
personNameTextController ??= TextEditingController();
|
||||
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();
|
||||
|
||||
notesTextController ??= TextEditingController();
|
||||
|
@ -109,7 +118,8 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisi
|
|||
}
|
||||
|
||||
bool isFormValid() {
|
||||
if (personNameTextController.text == '' || personNameTextController.text.length > 80) {
|
||||
if (personNameTextController.text == '' ||
|
||||
personNameTextController.text.length > 80) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -119,10 +129,12 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisi
|
|||
|
||||
DateTime selectedDateTime;
|
||||
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 {
|
||||
selectedDateTime = DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
||||
selectedDateTime =
|
||||
DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
|
@ -136,10 +148,14 @@ class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisi
|
|||
|
||||
Future<void> init() async {
|
||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
ownerName = (await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? '';
|
||||
ownerUUID = (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? '';
|
||||
userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
cliUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
ownerName =
|
||||
(await StorageHelper().get(ProfileStorageKey.ownerName.key)) ?? '';
|
||||
ownerUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? '';
|
||||
setState?.call();
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,10 @@
|
|||
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';
|
||||
|
||||
class QrCodePassKeyTemplateComponentModel extends FlutterFlowModel<QrCodePassKeyTemplateComponentWidget> {
|
||||
class QrCodePassKeyTemplateComponentModel
|
||||
extends FlutterFlowModel<QrCodePassKeyTemplateComponentWidget> {
|
||||
/// State fields for stateful widgets in this component.
|
||||
|
||||
final formKey = GlobalKey<FormState>();
|
||||
|
@ -11,7 +13,8 @@ class QrCodePassKeyTemplateComponentModel extends FlutterFlowModel<QrCodePassKey
|
|||
TextEditingController? keyTextFieldTextController;
|
||||
late bool keyTextFieldVisibility;
|
||||
String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator;
|
||||
String? _keyTextFieldTextControllerValidator(BuildContext context, String? val) {
|
||||
String? _keyTextFieldTextControllerValidator(
|
||||
BuildContext context, String? val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return FFLocalizations.of(context).getVariableText(
|
||||
enText: 'This field is required',
|
||||
|
|
|
@ -20,10 +20,12 @@ class QrCodePassKeyTemplateComponentWidget extends StatefulWidget {
|
|||
final Future Function(String key)? toggleActionStatus;
|
||||
|
||||
@override
|
||||
State<QrCodePassKeyTemplateComponentWidget> createState() => _QrCodePassKeyTemplateComponentWidgetState();
|
||||
State<QrCodePassKeyTemplateComponentWidget> createState() =>
|
||||
_QrCodePassKeyTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemplateComponentWidget> {
|
||||
class _QrCodePassKeyTemplateComponentWidgetState
|
||||
extends State<QrCodePassKeyTemplateComponentWidget> {
|
||||
late QrCodePassKeyTemplateComponentModel _model;
|
||||
|
||||
@override
|
||||
|
@ -83,7 +85,8 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
tablet: false,
|
||||
))
|
||||
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(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
|
@ -96,7 +99,8 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
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(
|
||||
Icons.arrow_back_rounded,
|
||||
color: Color(0xFF15161E),
|
||||
|
@ -104,16 +108,22 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
),
|
||||
),
|
||||
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(
|
||||
'',
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 16, 16, 14),
|
||||
fontSize:
|
||||
LimitedFontSizeUtil.getCalculateFontSize(
|
||||
context, 16, 16, 14),
|
||||
letterSpacing: 0.0,
|
||||
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: 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(
|
||||
FFLocalizations.of(context).getText(
|
||||
'h1xilful' /* DIGITE A SUA SENHA */,
|
||||
|
@ -130,15 +141,18 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Outfit',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 20, 20, 18),
|
||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(
|
||||
context, 20, 20, 18),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Outfit'),
|
||||
),
|
||||
),
|
||||
),
|
||||
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(
|
||||
FFLocalizations.of(context).getText(
|
||||
'ujodm2ci' /* Para gerar o QR Code digite a ... */,
|
||||
|
@ -146,10 +160,12 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 14, 14, 12),
|
||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(
|
||||
context, 14, 14, 12),
|
||||
letterSpacing: 0.0,
|
||||
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,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
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(
|
||||
controller: _model.keyTextFieldTextController,
|
||||
focusNode: _model.keyTextFieldFocusNode,
|
||||
|
@ -176,24 +193,32 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'rfqrdet7' /* Senha */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
fontSize:
|
||||
LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'zz1haydj' /* digite a sua senha..... */,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
fontSize:
|
||||
LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -225,14 +250,18 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
),
|
||||
filled: true,
|
||||
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(
|
||||
onTap: () => safeSetState(
|
||||
() => _model.keyTextFieldVisibility = !_model.keyTextFieldVisibility,
|
||||
() => _model.keyTextFieldVisibility =
|
||||
!_model.keyTextFieldVisibility,
|
||||
),
|
||||
focusNode: FocusNode(skipTraversal: true),
|
||||
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,
|
||||
size: 22.0,
|
||||
),
|
||||
|
@ -241,16 +270,23 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
fontSize:
|
||||
LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
maxLength: 4,
|
||||
maxLengthEnforcement: MaxLengthEnforcement.enforced,
|
||||
buildCounter: (context, {required currentLength, required isFocused, maxLength}) => null,
|
||||
buildCounter: (context,
|
||||
{required currentLength,
|
||||
required isFocused,
|
||||
maxLength}) =>
|
||||
null,
|
||||
keyboardType: TextInputType.number,
|
||||
validator: _model.keyTextFieldTextControllerValidator.asValidator(context),
|
||||
validator: _model.keyTextFieldTextControllerValidator
|
||||
.asValidator(context),
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||
LengthLimitingTextInputFormatter(4),
|
||||
|
@ -261,10 +297,12 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 15),
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 15),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
if (_model.formKey.currentState == null || !_model.formKey.currentState!.validate()) {
|
||||
if (_model.formKey.currentState == null ||
|
||||
!_model.formKey.currentState!.validate()) {
|
||||
return;
|
||||
}
|
||||
await widget.toggleActionStatus?.call(
|
||||
|
@ -278,16 +316,22 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
options: FFButtonOptions(
|
||||
width: 270.0,
|
||||
height: 50.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: const Color(0xFF1AAB5F),
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
textStyle: FlutterFlowTheme.of(context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
fontSize:
|
||||
LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
|
|
|
@ -10,7 +10,8 @@ import '/flutter_flow/flutter_flow_util.dart';
|
|||
import '/flutter_flow/form_field_controller.dart';
|
||||
import 'regisiter_vistor_template_component_widget.dart';
|
||||
|
||||
class RegisiterVistorTemplateComponentModel extends FlutterFlowModel<RegisiterVistorTemplateComponentWidget> {
|
||||
class RegisiterVistorTemplateComponentModel
|
||||
extends FlutterFlowModel<RegisiterVistorTemplateComponentWidget> {
|
||||
Timer? _debounceTimer;
|
||||
late final String devUUID;
|
||||
late final String userUUID;
|
||||
|
@ -18,7 +19,8 @@ class RegisiterVistorTemplateComponentModel extends FlutterFlowModel<RegisiterVi
|
|||
|
||||
final unfocusNode = FocusNode();
|
||||
bool isDataUploading = false;
|
||||
FFUploadedFile uploadedLocalFile = FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||
FFUploadedFile uploadedLocalFile =
|
||||
FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||
|
||||
void debounce(Function() fn, Duration time) {
|
||||
if (_debounceTimer != null) {
|
||||
|
@ -42,12 +44,14 @@ class RegisiterVistorTemplateComponentModel extends FlutterFlowModel<RegisiterVi
|
|||
return null;
|
||||
}
|
||||
|
||||
Future<bool> getVisitanteByDocument(String document, BuildContext context) async {
|
||||
Future<bool> getVisitanteByDocument(
|
||||
String document, BuildContext context) async {
|
||||
final response = await PhpGroup.getVisitorByDocCall.call(
|
||||
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 false;
|
||||
|
@ -90,7 +94,9 @@ class RegisiterVistorTemplateComponentModel extends FlutterFlowModel<RegisiterVi
|
|||
TextEditingController? textController4;
|
||||
String? Function(BuildContext, String?)? textController4Validator;
|
||||
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(
|
||||
enText: 'Invalid email',
|
||||
ptText: 'Email inválido',
|
||||
|
@ -130,8 +136,10 @@ class RegisiterVistorTemplateComponentModel extends FlutterFlowModel<RegisiterVi
|
|||
|
||||
Future<void> initializeDatabase() async {
|
||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
userUUID =
|
||||
(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? doc;
|
||||
|
||||
const RegisiterVistorTemplateComponentWidget({super.key, required this.source, this.doc});
|
||||
const RegisiterVistorTemplateComponentWidget(
|
||||
{super.key, required this.source, this.doc});
|
||||
|
||||
@override
|
||||
State<RegisiterVistorTemplateComponentWidget> createState() => _RegisiterVistorTemplateComponentWidgetState();
|
||||
State<RegisiterVistorTemplateComponentWidget> createState() =>
|
||||
_RegisiterVistorTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistorTemplateComponentWidget> {
|
||||
class _RegisiterVistorTemplateComponentWidgetState
|
||||
extends State<RegisiterVistorTemplateComponentWidget> {
|
||||
late RegisiterVistorTemplateComponentModel _model;
|
||||
bool _isLoading = false;
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
@ -50,7 +53,8 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
|
||||
visitorAlreadyRegistered = BehaviorSubject<bool>.seeded(false);
|
||||
|
||||
_model = createModel(context, () => RegisiterVistorTemplateComponentModel());
|
||||
_model =
|
||||
createModel(context, () => RegisiterVistorTemplateComponentModel());
|
||||
|
||||
_model.textController1 ??= TextEditingController();
|
||||
_model.textFieldFocusNode1 ??= FocusNode();
|
||||
|
@ -87,15 +91,19 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
return false;
|
||||
}
|
||||
|
||||
if (_model.textController1.text.isEmpty || _model.textController1.text == '') {
|
||||
if (_model.textController1.text.isEmpty ||
|
||||
_model.textController1.text == '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_model.dropDownValue == null || _model.dropDownValue!.isEmpty || _model.dropDownValue == '') {
|
||||
if (_model.dropDownValue == null ||
|
||||
_model.dropDownValue!.isEmpty ||
|
||||
_model.dropDownValue == '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_model.textController2.text.isEmpty || _model.textController2.text == '') {
|
||||
if (_model.textController2.text.isEmpty ||
|
||||
_model.textController2.text == '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -103,7 +111,9 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
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;
|
||||
}
|
||||
|
||||
|
@ -113,8 +123,10 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
double limitedHeaderFontSize =
|
||||
LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedSubHeaderFontSize =
|
||||
LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
|
@ -141,7 +153,8 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
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(
|
||||
FFLocalizations.of(context).getText(
|
||||
'zazj5d8b' /* Preencha o formulário com os d... */,
|
||||
|
@ -149,16 +162,19 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
overflow: TextOverflow.clip,
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
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: [
|
||||
TextFormField(
|
||||
controller: _model.textController2,
|
||||
|
@ -177,19 +193,28 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'rl8tvwnr' /* Documento */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
|
@ -228,22 +253,29 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
onChanged: (value) {
|
||||
_model.debounce(() async {
|
||||
var data = await _model.getVisitanteByDocument(value, context);
|
||||
var data = await _model.getVisitanteByDocument(
|
||||
value, context);
|
||||
setState(() {
|
||||
_isVisitorRegistered = data;
|
||||
});
|
||||
}, const Duration(milliseconds: 500));
|
||||
},
|
||||
validator: _model.textController2Validator.asValidator(context),
|
||||
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]')), LengthLimitingTextInputFormatter(20)],
|
||||
validator:
|
||||
_model.textController2Validator.asValidator(context),
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||
LengthLimitingTextInputFormatter(20)
|
||||
],
|
||||
),
|
||||
_model.textController2.text.isEmpty
|
||||
? const SizedBox()
|
||||
|
@ -253,17 +285,29 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.only(top: 5, start: 12),
|
||||
padding: const EdgeInsetsDirectional.only(
|
||||
top: 5, start: 12),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
enText: 'Visitor already registered',
|
||||
ptText: 'Visitante já cadastrado',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).labelSmall.override(
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.labelSmall
|
||||
.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: Theme.of(context).brightness == Brightness.dark
|
||||
? Color.alphaBlend(Colors.white.withOpacity(0.7), Colors.red)
|
||||
: Color.alphaBlend(Colors.black.withOpacity(0.25), Colors.red),
|
||||
color: Theme.of(context)
|
||||
.brightness ==
|
||||
Brightness.dark
|
||||
? Color.alphaBlend(
|
||||
Colors.white
|
||||
.withOpacity(0.7),
|
||||
Colors.red)
|
||||
: Color.alphaBlend(
|
||||
Colors.black
|
||||
.withOpacity(0.25),
|
||||
Colors.red),
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
)),
|
||||
|
@ -274,7 +318,8 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
]),
|
||||
),
|
||||
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(
|
||||
controller: _model.textController1,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
|
@ -293,18 +338,26 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'v7g73yik' /* Nome */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
|
@ -345,25 +398,30 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
maxLines: null,
|
||||
maxLength: 80,
|
||||
keyboardType: TextInputType.name,
|
||||
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
||||
validator: _model.textController1Validator.asValidator(context),
|
||||
validator:
|
||||
_model.textController1Validator.asValidator(context),
|
||||
),
|
||||
),
|
||||
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(
|
||||
children: [
|
||||
FlutterFlowDropDown<String>(
|
||||
controller: _model.dropDownValueController ??= FormFieldController<String>(null),
|
||||
controller: _model.dropDownValueController ??=
|
||||
FormFieldController<String>(null),
|
||||
options: [
|
||||
FFLocalizations.of(context).getText(
|
||||
'n8vddmcq' /* Visitante */,
|
||||
|
@ -372,14 +430,20 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
'9luaa09e' /* Prestador de Serviço */,
|
||||
)
|
||||
],
|
||||
onChanged: (val) => setState(() => _model.dropDownValue = val),
|
||||
onChanged: (val) =>
|
||||
setState(() => _model.dropDownValue = val),
|
||||
width: MediaQuery.sizeOf(context).width * 0.9,
|
||||
// height: 44.0,
|
||||
textStyle: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
textStyle: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
|
@ -395,29 +459,39 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
borderColor: FlutterFlowTheme.of(context).customColor6,
|
||||
borderWidth: 0.5,
|
||||
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,
|
||||
isOverButton: true,
|
||||
isSearchable: false,
|
||||
isMultiSelect: false,
|
||||
),
|
||||
if (_model.dropDownValue == null || _model.dropDownValue == '')
|
||||
if (_model.dropDownValue == null ||
|
||||
_model.dropDownValue == '')
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.only(top: 5, start: 15),
|
||||
padding: const EdgeInsetsDirectional.only(
|
||||
top: 5, start: 15),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Select the type of visitor',
|
||||
ptText: 'Selecione o tipo de visitante',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodySmall
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodySmallFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.customColor6,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodySmallFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
)),
|
||||
),
|
||||
|
@ -427,10 +501,12 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
),
|
||||
),
|
||||
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(
|
||||
builder: (context) {
|
||||
if ((_model.uploadedLocalFile.bytes?.isNotEmpty ?? false)) {
|
||||
if ((_model.uploadedLocalFile.bytes?.isNotEmpty ??
|
||||
false)) {
|
||||
return InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
|
@ -439,13 +515,15 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
onTap: () async {
|
||||
setState(() {
|
||||
_model.isDataUploading = false;
|
||||
_model.uploadedLocalFile = FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||
_model.uploadedLocalFile =
|
||||
FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||
});
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: Image.memory(
|
||||
_model.uploadedLocalFile.bytes ?? Uint8List.fromList([]),
|
||||
_model.uploadedLocalFile.bytes ??
|
||||
Uint8List.fromList([]),
|
||||
width: 300.0,
|
||||
height: 200.0,
|
||||
fit: BoxFit.cover,
|
||||
|
@ -474,23 +552,27 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
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(
|
||||
FFLocalizations.of(context).getText(
|
||||
'bqpucwh0' /* Contatos */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
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(
|
||||
controller: _model.textController3,
|
||||
focusNode: _model.textFieldFocusNode3,
|
||||
|
@ -501,7 +583,11 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
|
||||
maxLength: 25,
|
||||
keyboardType: TextInputType.phone,
|
||||
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9, +, -, (, )]')), LengthLimitingTextInputFormatter(25)],
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[0-9, +, -, (, )]')),
|
||||
LengthLimitingTextInputFormatter(25)
|
||||
],
|
||||
obscureText: false,
|
||||
|
||||
decoration: InputDecoration(
|
||||
|
@ -509,18 +595,26 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'h84ls2r6' /* Telefone */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
|
@ -557,10 +651,12 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
// validator:
|
||||
|
@ -568,7 +664,8 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
),
|
||||
),
|
||||
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(
|
||||
controller: _model.textController4,
|
||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||
|
@ -588,18 +685,26 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'fqp7qmka' /* Email */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
|
@ -636,27 +741,33 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
||||
validator: _model.textController4Validator.asValidator(context),
|
||||
validator:
|
||||
_model.textController4Validator.asValidator(context),
|
||||
),
|
||||
),
|
||||
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(
|
||||
onPressed: _isFormValid(context)
|
||||
? () async {
|
||||
_model.imgBase64 = await ImageUtils.convertImageFileToBase64(
|
||||
_model.imgBase64 =
|
||||
await ImageUtils.convertImageFileToBase64(
|
||||
_model.uploadedLocalFile,
|
||||
);
|
||||
_model.scheduleVisitor = await PhpGroup.postScheduleVisitorCall
|
||||
.call(
|
||||
_model.scheduleVisitor =
|
||||
await PhpGroup.postScheduleVisitorCall
|
||||
.call(
|
||||
documento: _model.textController2.text,
|
||||
nome: _model.textController1.text,
|
||||
tipo: _model.dropDownValue ==
|
||||
|
@ -667,7 +778,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
: 'P',
|
||||
foto: 'base64;jpeg,${_model.imgBase64}',
|
||||
)
|
||||
.onError((e, s) async {
|
||||
.onError((e, s) async {
|
||||
return await DialogUtil.errorDefault(context);
|
||||
});
|
||||
if (PhpGroup.postScheduleVisitorCall.error(
|
||||
|
@ -680,16 +791,23 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
_model.textController3?.clear();
|
||||
_model.textController4?.clear();
|
||||
_model.dropDownValueController?.reset();
|
||||
_model.uploadedLocalFile = FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||
_model.uploadedLocalFile = FFUploadedFile(
|
||||
bytes: Uint8List.fromList([]));
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content:
|
||||
Text(FFLocalizations.of(context).getVariableText(ptText: 'Visitante cadastrado com sucesso.', enText: 'Visitor successfully registered.'),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: limitedInputFontSize,
|
||||
)),
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
content: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText:
|
||||
'Visitante cadastrado com sucesso.',
|
||||
enText:
|
||||
'Visitor successfully registered.'),
|
||||
style: TextStyle(
|
||||
color:
|
||||
FlutterFlowTheme.of(context).info,
|
||||
fontSize: limitedInputFontSize,
|
||||
)),
|
||||
backgroundColor:
|
||||
FlutterFlowTheme.of(context).primary,
|
||||
duration: const Duration(seconds: 3),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
behavior: SnackBarBehavior.floating,
|
||||
|
@ -702,19 +820,28 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
),
|
||||
);
|
||||
_formKey.currentState?.reset();
|
||||
if (widget.source == 'VisitorNotFoundComponent') {
|
||||
if (widget.source ==
|
||||
'VisitorNotFoundComponent') {
|
||||
Navigator.pop(context, true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return await DialogUtil.error(
|
||||
context,
|
||||
PhpGroup.postScheduleVisitorCall.errorMsg(_model.scheduleVisitor?.jsonBody) == null
|
||||
? FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Erro ao se conectar com o servidor',
|
||||
PhpGroup.postScheduleVisitorCall.errorMsg(
|
||||
_model
|
||||
.scheduleVisitor?.jsonBody) ==
|
||||
null
|
||||
? FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
ptText:
|
||||
'Erro ao se conectar com o servidor',
|
||||
enText: 'Error connecting to server',
|
||||
)
|
||||
: PhpGroup.postScheduleVisitorCall.errorMsg(_model.scheduleVisitor?.jsonBody).toString());
|
||||
: PhpGroup.postScheduleVisitorCall
|
||||
.errorMsg(
|
||||
_model.scheduleVisitor?.jsonBody)
|
||||
.toString());
|
||||
}
|
||||
}
|
||||
: null,
|
||||
|
@ -724,14 +851,20 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
options: FFButtonOptions(
|
||||
height: 30.0 * MediaQuery.textScalerOf(context).scale(1),
|
||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(80.0, 0.0, 80.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
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,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||
textStyle: FlutterFlowTheme.of(context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).titleSmallFamily,
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
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 '/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 unfocusNode = FocusNode();
|
||||
FocusNode? emailAddressFocusNode;
|
||||
TextEditingController? emailAddressTextController;
|
||||
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
|
||||
SignInTemplateComponentModel();
|
||||
String? _emailAddressTextControllerValidator(BuildContext context, String? val) {
|
||||
String? _emailAddressTextControllerValidator(
|
||||
BuildContext context, String? val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return FFLocalizations.of(context).getText(
|
||||
'xhnawzcb' /* Campo é necessário */,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,14 +1,18 @@
|
|||
import 'package:flutter/material.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>();
|
||||
FocusNode? nameRegisterFormFocusNode;
|
||||
TextEditingController? nameRegisterFormTextController;
|
||||
String? Function(BuildContext, String?)? nameRegisterFormTextControllerValidator;
|
||||
String? _nameRegisterFormTextControllerValidator(BuildContext context, String? val) {
|
||||
String? Function(BuildContext, String?)?
|
||||
nameRegisterFormTextControllerValidator;
|
||||
String? _nameRegisterFormTextControllerValidator(
|
||||
BuildContext context, String? val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return FFLocalizations.of(context).getText(
|
||||
'3bs10dfq' /* Campo é necessário */,
|
||||
|
@ -20,8 +24,10 @@ class SignUpTemplateComponentModel extends FlutterFlowModel<SignUpTemplateCompon
|
|||
|
||||
FocusNode? emailRegisterFormFocusNode;
|
||||
TextEditingController? emailRegisterFormTextController;
|
||||
String? Function(BuildContext, String?)? emailRegisterFormTextControllerValidator;
|
||||
String? _emailRegisterFormTextControllerValidator(BuildContext context, String? val) {
|
||||
String? Function(BuildContext, String?)?
|
||||
emailRegisterFormTextControllerValidator;
|
||||
String? _emailRegisterFormTextControllerValidator(
|
||||
BuildContext context, String? val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return FFLocalizations.of(context).getText(
|
||||
'mlvw63yj' /* Campo é necessário */,
|
||||
|
@ -39,8 +45,10 @@ class SignUpTemplateComponentModel extends FlutterFlowModel<SignUpTemplateCompon
|
|||
FocusNode? passwordRegisterFormFocusNode;
|
||||
TextEditingController? passwordRegisterFormTextController;
|
||||
late bool passwordRegisterFormVisibility;
|
||||
String? Function(BuildContext, String?)? passwordRegisterFormTextControllerValidator;
|
||||
String? _passwordRegisterFormTextControllerValidator(BuildContext context, String? val) {
|
||||
String? Function(BuildContext, String?)?
|
||||
passwordRegisterFormTextControllerValidator;
|
||||
String? _passwordRegisterFormTextControllerValidator(
|
||||
BuildContext context, String? val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return FFLocalizations.of(context).getText(
|
||||
'6nn79lmh' /* Campo é necessário */,
|
||||
|
@ -60,10 +68,13 @@ class SignUpTemplateComponentModel extends FlutterFlowModel<SignUpTemplateCompon
|
|||
|
||||
@override
|
||||
void initState(BuildContext context) {
|
||||
nameRegisterFormTextControllerValidator = _nameRegisterFormTextControllerValidator;
|
||||
emailRegisterFormTextControllerValidator = _emailRegisterFormTextControllerValidator;
|
||||
nameRegisterFormTextControllerValidator =
|
||||
_nameRegisterFormTextControllerValidator;
|
||||
emailRegisterFormTextControllerValidator =
|
||||
_emailRegisterFormTextControllerValidator;
|
||||
passwordRegisterFormVisibility = false;
|
||||
passwordRegisterFormTextControllerValidator = _passwordRegisterFormTextControllerValidator;
|
||||
passwordRegisterFormTextControllerValidator =
|
||||
_passwordRegisterFormTextControllerValidator;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -19,13 +19,16 @@ import 'sign_up_template_component_model.dart';
|
|||
export 'sign_up_template_component_model.dart';
|
||||
|
||||
class SignUpTemplateComponentWidget extends StatefulWidget {
|
||||
const SignUpTemplateComponentWidget({super.key, required this.toggleSignInPage});
|
||||
const SignUpTemplateComponentWidget(
|
||||
{super.key, required this.toggleSignInPage});
|
||||
final Future Function()? toggleSignInPage;
|
||||
@override
|
||||
State<SignUpTemplateComponentWidget> createState() => _SignUpTemplateComponentWidgetState();
|
||||
State<SignUpTemplateComponentWidget> createState() =>
|
||||
_SignUpTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
|
||||
class _SignUpTemplateComponentWidgetState
|
||||
extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
|
||||
late SignUpTemplateComponentModel _model;
|
||||
final animationsMap = <String, AnimationInfo>{};
|
||||
late String _deviceType;
|
||||
|
@ -91,7 +94,8 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
}
|
||||
|
||||
Future<void> _initialize() async {
|
||||
_deviceType = (await StorageHelper().get(SecureStorageKey.deviceType.value)) ?? '';
|
||||
_deviceType =
|
||||
(await StorageHelper().get(SecureStorageKey.deviceType.value)) ?? '';
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -107,19 +111,24 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
final double screenWidth = mediaQuery.size.width;
|
||||
final double screenHeight = mediaQuery.size.height;
|
||||
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedHeaderFontSize =
|
||||
LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
|
||||
bool isFormInvalid() {
|
||||
if (_model.nameRegisterFormTextController.text == '' || _model.emailRegisterFormTextController.text == '' || _model.passwordRegisterFormTextController.text == '') {
|
||||
if (_model.nameRegisterFormTextController.text == '' ||
|
||||
_model.emailRegisterFormTextController.text == '' ||
|
||||
_model.passwordRegisterFormTextController.text == '') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!ValidatorUtil.isValidEmail(_model.emailRegisterFormTextController.text)) {
|
||||
if (!ValidatorUtil.isValidEmail(
|
||||
_model.emailRegisterFormTextController.text)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!ValidatorUtil.isValidPassword(_model.passwordRegisterFormTextController.text)) {
|
||||
if (!ValidatorUtil.isValidPassword(
|
||||
_model.passwordRegisterFormTextController.text)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -156,13 +165,17 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
'49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.displaySmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
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,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
child: Align(
|
||||
|
@ -203,271 +217,510 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
padding: const EdgeInsets.all(32.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
Form(
|
||||
key: _model.formKey,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
autovalidateMode:
|
||||
AutovalidateMode.onUserInteraction,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
key: const ValueKey<String>('nameTextFormField'),
|
||||
controller: _model.nameRegisterFormTextController,
|
||||
focusNode: _model.nameRegisterFormFocusNode,
|
||||
onChanged: (_) => EasyDebounce.debounce(
|
||||
key: const ValueKey<String>(
|
||||
'nameTextFormField'),
|
||||
controller: _model
|
||||
.nameRegisterFormTextController,
|
||||
focusNode: _model
|
||||
.nameRegisterFormFocusNode,
|
||||
onChanged: (_) =>
|
||||
EasyDebounce.debounce(
|
||||
'_model.nameRegisterFormTextController',
|
||||
const Duration(milliseconds: 500),
|
||||
const Duration(
|
||||
milliseconds: 500),
|
||||
() => setState(() {}),
|
||||
),
|
||||
autofocus: false,
|
||||
autofillHints: const [AutofillHints.name],
|
||||
autofillHints: const [
|
||||
AutofillHints.name
|
||||
],
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
labelText:
|
||||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'3corpwhd' /* Nome */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
labelStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
.labelLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primaryText,
|
||||
fontSize:
|
||||
limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
enabledBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.customColor1,
|
||||
width: 0.25,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
focusedBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).success,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.success,
|
||||
width: 0.25,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
errorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
width: 0.25,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
fontSize: limitedInputFontSize,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
fontSize:
|
||||
limitedInputFontSize,
|
||||
fontWeight:
|
||||
FontWeight.w400,
|
||||
fontStyle:
|
||||
FontStyle.normal,
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
width: 0.25,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
fillColor:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryBackground,
|
||||
suffixIcon: Icon(
|
||||
Icons.person,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.accent1,
|
||||
size: 22.0,
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize:
|
||||
limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
validator: _model.nameRegisterFormTextControllerValidator.asValidator(context),
|
||||
validator: _model
|
||||
.nameRegisterFormTextControllerValidator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
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(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
key: const ValueKey<String>('emailTextFormField'),
|
||||
controller: _model.emailRegisterFormTextController,
|
||||
focusNode: _model.emailRegisterFormFocusNode,
|
||||
onChanged: (_) => EasyDebounce.debounce(
|
||||
key: const ValueKey<String>(
|
||||
'emailTextFormField'),
|
||||
controller: _model
|
||||
.emailRegisterFormTextController,
|
||||
focusNode: _model
|
||||
.emailRegisterFormFocusNode,
|
||||
onChanged: (_) =>
|
||||
EasyDebounce.debounce(
|
||||
'_model.emailRegisterFormTextController',
|
||||
const Duration(milliseconds: 500),
|
||||
const Duration(
|
||||
milliseconds: 500),
|
||||
() => setState(() {}),
|
||||
),
|
||||
autofocus: false,
|
||||
autofillHints: const [AutofillHints.email],
|
||||
autofillHints: const [
|
||||
AutofillHints.email
|
||||
],
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
labelText:
|
||||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'80wonb69' /* Email */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
labelStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
.labelLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primaryText,
|
||||
fontSize:
|
||||
limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
enabledBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
width: 0.25,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
focusedBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).success,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.success,
|
||||
width: 0.25,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
errorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
width: 0.25,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
fontSize: limitedInputFontSize,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
fontSize:
|
||||
limitedInputFontSize,
|
||||
fontWeight:
|
||||
FontWeight.w400,
|
||||
fontStyle:
|
||||
FontStyle.normal,
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
width: 0.25,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
fillColor:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryBackground,
|
||||
suffixIcon: Icon(
|
||||
Icons.email,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.accent1,
|
||||
size: 22.0,
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
fontSize: limitedInputFontSize,
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.customColor1,
|
||||
fontSize:
|
||||
limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
validator: _model.emailRegisterFormTextControllerValidator.asValidator(context),
|
||||
keyboardType: TextInputType
|
||||
.emailAddress,
|
||||
validator: _model
|
||||
.emailRegisterFormTextControllerValidator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
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(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
key: const ValueKey<String>('passwordTextFormField'),
|
||||
controller: _model.passwordRegisterFormTextController,
|
||||
focusNode: _model.passwordRegisterFormFocusNode,
|
||||
onChanged: (_) => EasyDebounce.debounce(
|
||||
key: const ValueKey<String>(
|
||||
'passwordTextFormField'),
|
||||
controller: _model
|
||||
.passwordRegisterFormTextController,
|
||||
focusNode: _model
|
||||
.passwordRegisterFormFocusNode,
|
||||
onChanged: (_) =>
|
||||
EasyDebounce.debounce(
|
||||
'_model.passwordRegisterFormTextController',
|
||||
const Duration(milliseconds: 500),
|
||||
const Duration(
|
||||
milliseconds: 500),
|
||||
() => setState(() {}),
|
||||
),
|
||||
autofocus: false,
|
||||
autofillHints: const [AutofillHints.password],
|
||||
obscureText: !_model.passwordRegisterFormVisibility,
|
||||
autofillHints: const [
|
||||
AutofillHints.password
|
||||
],
|
||||
obscureText: !_model
|
||||
.passwordRegisterFormVisibility,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
labelText:
|
||||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'0firji8l' /* Senha */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
labelStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
.labelLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primaryText,
|
||||
fontSize:
|
||||
limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
enabledBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.customColor1,
|
||||
width: 0.25,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Color(0xFF1AAB5F),
|
||||
focusedBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide:
|
||||
const BorderSide(
|
||||
color:
|
||||
Color(0xFF1AAB5F),
|
||||
width: 0.25,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Color(0xFFFF5963),
|
||||
errorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide:
|
||||
const BorderSide(
|
||||
color:
|
||||
Color(0xFFFF5963),
|
||||
width: 0.25,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
fontSize: limitedInputFontSize,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
fontSize:
|
||||
limitedInputFontSize,
|
||||
fontWeight:
|
||||
FontWeight.w400,
|
||||
fontStyle:
|
||||
FontStyle.normal,
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Color(0xFFFF5963),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide:
|
||||
const BorderSide(
|
||||
color:
|
||||
Color(0xFFFF5963),
|
||||
width: 0.25,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
fillColor:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryBackground,
|
||||
suffixIcon: InkWell(
|
||||
key: const ValueKey<String>('passwordVisibilitySuffixIcon'),
|
||||
key: const ValueKey<
|
||||
String>(
|
||||
'passwordVisibilitySuffixIcon'),
|
||||
onTap: () => setState(
|
||||
() => _model.passwordRegisterFormVisibility = !_model.passwordRegisterFormVisibility,
|
||||
() => _model
|
||||
.passwordRegisterFormVisibility =
|
||||
!_model
|
||||
.passwordRegisterFormVisibility,
|
||||
),
|
||||
focusNode: FocusNode(skipTraversal: true),
|
||||
focusNode: FocusNode(
|
||||
skipTraversal: true),
|
||||
child: Icon(
|
||||
_model.passwordRegisterFormVisibility ? Icons.visibility_outlined : Icons.visibility_off_outlined,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
_model.passwordRegisterFormVisibility
|
||||
? Icons
|
||||
.visibility_outlined
|
||||
: Icons
|
||||
.visibility_off_outlined,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize:
|
||||
limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
fontWeight:
|
||||
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: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('SubmitButtonWidget'),
|
||||
key: const ValueKey<String>(
|
||||
'SubmitButtonWidget'),
|
||||
onPressed: isFormInvalid()
|
||||
? null
|
||||
: () async {
|
||||
var shouldSetState = false;
|
||||
_model.register = await AuthenticationService.signUp(
|
||||
_model.register =
|
||||
await AuthenticationService
|
||||
.signUp(
|
||||
context,
|
||||
email: _model.emailRegisterFormTextController.text,
|
||||
name: _model.nameRegisterFormTextController.text,
|
||||
passwd: _model.passwordRegisterFormTextController.text,
|
||||
email: _model
|
||||
.emailRegisterFormTextController
|
||||
.text,
|
||||
name: _model
|
||||
.nameRegisterFormTextController
|
||||
.text,
|
||||
passwd: _model
|
||||
.passwordRegisterFormTextController
|
||||
.text,
|
||||
device: _deviceType,
|
||||
);
|
||||
shouldSetState = true;
|
||||
if (_model.register == true)
|
||||
await widget.toggleSignInPage?.call();
|
||||
await widget
|
||||
.toggleSignInPage
|
||||
?.call();
|
||||
else {
|
||||
if (shouldSetState) setState(() {});
|
||||
if (shouldSetState)
|
||||
setState(() {});
|
||||
return;
|
||||
}
|
||||
if (shouldSetState) setState(() {});
|
||||
if (shouldSetState)
|
||||
setState(() {});
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
text: FFLocalizations.of(context)
|
||||
.getText(
|
||||
'rnvdwzei' /* Cadastrar-se */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
textStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.secondaryText,
|
||||
fontSize:
|
||||
limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
disabledColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.customColor5,
|
||||
disabledTextColor: Colors.white,
|
||||
),
|
||||
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.
|
||||
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(
|
||||
key: const ValueKey<String>('toggleSignInPage'),
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignInPage'),
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async => await widget.toggleSignInPage?.call(),
|
||||
onTap: () async => await widget
|
||||
.toggleSignInPage
|
||||
?.call(),
|
||||
child: RichText(
|
||||
textScaler: MediaQuery.of(context).textScaler,
|
||||
textScaler: MediaQuery.of(context)
|
||||
.textScaler,
|
||||
text: TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: FFLocalizations.of(context).getText(
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'a9smhn5b' /* Você já tem uma conta? */,
|
||||
),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize:
|
||||
limitedInputFontSize,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: FFLocalizations.of(context).getText(
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'09xv5ctc' /* Clique aqui */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
fontSize: limitedInputFontSize,
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primary,
|
||||
fontSize:
|
||||
limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
)
|
||||
],
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -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 {
|
||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
userUUID =
|
||||
(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.textController2 ??= TextEditingController(text: widget.visitStartDate);
|
||||
_model.textController2 ??=
|
||||
TextEditingController(text: widget.visitStartDate);
|
||||
_model.textFieldFocusNode2 ??= FocusNode();
|
||||
|
||||
_model.textController3 ??= TextEditingController(text: widget.visitEndDate);
|
||||
_model.textFieldFocusNode3 ??= FocusNode();
|
||||
|
||||
_model.textController4 ??= TextEditingController(text: widget.visitReasonStr);
|
||||
_model.textController4 ??=
|
||||
TextEditingController(text: widget.visitReasonStr);
|
||||
_model.textFieldFocusNode4 ??= FocusNode();
|
||||
|
||||
_model.textController5 ??= TextEditingController(text: widget.visitLevelStr);
|
||||
_model.textController5 ??=
|
||||
TextEditingController(text: widget.visitLevelStr);
|
||||
_model.textFieldFocusNode5 ??= FocusNode();
|
||||
|
||||
_model.textController6 ??= TextEditingController(text: widget.visitObsStr);
|
||||
|
@ -113,7 +117,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var filteredVisitorJsonList = findVisitorById(widget.visitorJsonList, widget.visitIdStr) ?? 'null';
|
||||
var filteredVisitorJsonList =
|
||||
findVisitorById(widget.visitorJsonList, widget.visitIdStr) ?? 'null';
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 200.0, 0.0, 0.0),
|
||||
|
@ -149,7 +154,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
child: Align(
|
||||
alignment: const AlignmentDirectional(1.0, 0.0),
|
||||
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(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
|
@ -178,7 +184,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||
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(
|
||||
width: 100.0,
|
||||
decoration: const BoxDecoration(),
|
||||
|
@ -218,8 +225,10 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration: const Duration(milliseconds: 500),
|
||||
fadeOutDuration: const Duration(milliseconds: 500),
|
||||
fadeInDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
fadeOutDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
imageUrl: valueOrDefault<String>(
|
||||
widget.visitorImgPath,
|
||||
'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(
|
||||
decoration: const BoxDecoration(),
|
||||
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(
|
||||
controller: _model.textController1,
|
||||
focusNode: _model.textFieldFocusNode1,
|
||||
|
@ -252,17 +262,27 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'9yu35pzg' /* Encerramento da Visita */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -294,23 +314,29 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
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: 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(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
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(
|
||||
controller: _model.textController2,
|
||||
focusNode: _model.textFieldFocusNode2,
|
||||
|
@ -324,20 +350,34 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'aj6scczp' /* Início */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'ub084nhy' /* dd/mm/yyyy */,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -368,19 +408,27 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
validator: _model.textController2Validator.asValidator(context),
|
||||
validator: _model.textController2Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
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(
|
||||
controller: _model.textController3,
|
||||
focusNode: _model.textFieldFocusNode3,
|
||||
|
@ -394,20 +442,34 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'rvi5z7wg' /* Término */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'ixs67mrz' /* dd/mm/yyyy */,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -438,13 +500,20 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
validator: _model.textController3Validator.asValidator(context),
|
||||
validator: _model.textController3Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -452,14 +521,16 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
),
|
||||
),
|
||||
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(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
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(
|
||||
controller: _model.textController4,
|
||||
focusNode: _model.textFieldFocusNode4,
|
||||
|
@ -473,20 +544,34 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'yxilg7ek' /* Motivo da Visita */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'ypeydbem' /* Motivo */,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -517,19 +602,27 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
validator: _model.textController4Validator.asValidator(context),
|
||||
validator: _model.textController4Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
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(
|
||||
controller: _model.textController5,
|
||||
focusNode: _model.textFieldFocusNode5,
|
||||
|
@ -543,20 +636,34 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'dgr3pk3a' /* Nível de Acesso */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'rs3d4gb8' /* Nível de Acesso */,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -587,13 +694,20 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
validator: _model.textController5Validator.asValidator(context),
|
||||
validator: _model.textController5Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -603,7 +717,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
Container(
|
||||
decoration: const BoxDecoration(),
|
||||
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(
|
||||
controller: _model.textController6,
|
||||
focusNode: _model.textFieldFocusNode6,
|
||||
|
@ -617,17 +732,27 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'lppn9rxa' /* Observações da Visita */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -659,11 +784,15 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
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,
|
||||
),
|
||||
onPressed: () async {
|
||||
_model.deleteVisit = await PhpGroup.deleteVisitCall.call(
|
||||
_model.deleteVisit =
|
||||
await PhpGroup.deleteVisitCall.call(
|
||||
idVisita: widget.visitIdStr,
|
||||
);
|
||||
|
||||
|
@ -698,7 +828,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
false) {
|
||||
context.pop();
|
||||
} else {
|
||||
final error = await DialogUtil.errorDefault(context);
|
||||
final error =
|
||||
await DialogUtil.errorDefault(context);
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
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(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
|
|
|
@ -5,7 +5,8 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class VisitDetailsModalTemplateComponentModel extends FlutterFlowModel<VisitDetailsModalTemplateComponentWidget> {
|
||||
class VisitDetailsModalTemplateComponentModel
|
||||
extends FlutterFlowModel<VisitDetailsModalTemplateComponentWidget> {
|
||||
/// Local state fields for this component.
|
||||
|
||||
Color statusColor = const Color(0xff000000);
|
||||
|
@ -20,7 +21,8 @@ class VisitDetailsModalTemplateComponentModel extends FlutterFlowModel<VisitDeta
|
|||
@override
|
||||
void initState(BuildContext context) {
|
||||
viewVisitDetailModel = createModel(context, () => ViewVisitDetailModel());
|
||||
scheduleVisitDetailModel = createModel(context, () => ScheduleVisitDetailModel());
|
||||
scheduleVisitDetailModel =
|
||||
createModel(context, () => ScheduleVisitDetailModel());
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -41,10 +41,12 @@ class VisitDetailsModalTemplateComponentWidget extends StatefulWidget {
|
|||
final Color? visitStatusColor;
|
||||
|
||||
@override
|
||||
State<VisitDetailsModalTemplateComponentWidget> createState() => _VisitDetailsModalTemplateComponentWidgetState();
|
||||
State<VisitDetailsModalTemplateComponentWidget> createState() =>
|
||||
_VisitDetailsModalTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _VisitDetailsModalTemplateComponentWidgetState extends State<VisitDetailsModalTemplateComponentWidget> {
|
||||
class _VisitDetailsModalTemplateComponentWidgetState
|
||||
extends State<VisitDetailsModalTemplateComponentWidget> {
|
||||
late VisitDetailsModalTemplateComponentModel _model;
|
||||
|
||||
@override
|
||||
|
@ -56,7 +58,8 @@ class _VisitDetailsModalTemplateComponentWidgetState extends State<VisitDetailsM
|
|||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => VisitDetailsModalTemplateComponentModel());
|
||||
_model =
|
||||
createModel(context, () => VisitDetailsModalTemplateComponentModel());
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
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';
|
||||
|
||||
class VisitorDetailsModalTemplateComponentModel extends FlutterFlowModel<VisitorDetailsModalTemplateComponentWidget> {
|
||||
class VisitorDetailsModalTemplateComponentModel
|
||||
extends FlutterFlowModel<VisitorDetailsModalTemplateComponentWidget> {
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
|
|
|
@ -25,10 +25,12 @@ class VisitorDetailsModalTemplateComponentWidget extends StatefulWidget {
|
|||
final String? visitorEmail;
|
||||
|
||||
@override
|
||||
State<VisitorDetailsModalTemplateComponentWidget> createState() => _VisitorDetailsModalTemplateComponentWidgetState();
|
||||
State<VisitorDetailsModalTemplateComponentWidget> createState() =>
|
||||
_VisitorDetailsModalTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _VisitorDetailsModalTemplateComponentWidgetState extends State<VisitorDetailsModalTemplateComponentWidget> {
|
||||
class _VisitorDetailsModalTemplateComponentWidgetState
|
||||
extends State<VisitorDetailsModalTemplateComponentWidget> {
|
||||
late VisitorDetailsModalTemplateComponentModel _model;
|
||||
|
||||
@override
|
||||
|
@ -40,7 +42,8 @@ class _VisitorDetailsModalTemplateComponentWidgetState extends State<VisitorDeta
|
|||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => VisitorDetailsModalTemplateComponentModel());
|
||||
_model =
|
||||
createModel(context, () => VisitorDetailsModalTemplateComponentModel());
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -82,7 +85,8 @@ class _VisitorDetailsModalTemplateComponentWidgetState extends State<VisitorDeta
|
|||
child: Align(
|
||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||
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(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
|
@ -103,18 +107,21 @@ class _VisitorDetailsModalTemplateComponentWidgetState extends State<VisitorDeta
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
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(
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
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(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
if (widget.visitorImageURL != '' && widget.visitorImageURL != null)
|
||||
if (widget.visitorImageURL != '' &&
|
||||
widget.visitorImageURL != null)
|
||||
Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
|
@ -130,17 +137,23 @@ class _VisitorDetailsModalTemplateComponentWidgetState extends State<VisitorDeta
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
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(
|
||||
widget.visitorName ?? '',
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
fontSize: 24.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -148,18 +161,24 @@ class _VisitorDetailsModalTemplateComponentWidgetState extends State<VisitorDeta
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
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(
|
||||
FFLocalizations.of(context).getText(
|
||||
'hz7ivuqn' /* Tipo de Visitante */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
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,
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
alignment:
|
||||
const AlignmentDirectional(-1.0, 0.0),
|
||||
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(
|
||||
FFLocalizations.of(context).getText(
|
||||
'rwqn0det' /* (00) 0 0000-0000 */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
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,
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
alignment:
|
||||
const AlignmentDirectional(-1.0, 0.0),
|
||||
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(
|
||||
FFLocalizations.of(context).getText(
|
||||
'0wqbiekp' /* email@provider.etc */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
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/flutter_flow/flutter_flow_model.dart';
|
||||
|
||||
class VisitorSearchModalTemplateComponentModel extends FlutterFlowModel<VisitorSearchModalTemplateComponentWidget> {
|
||||
class VisitorSearchModalTemplateComponentModel
|
||||
extends FlutterFlowModel<VisitorSearchModalTemplateComponentWidget> {
|
||||
late final String devUUID;
|
||||
late final String userUUID;
|
||||
late final String cliUUID;
|
||||
|
@ -13,15 +14,18 @@ class VisitorSearchModalTemplateComponentModel extends FlutterFlowModel<VisitorS
|
|||
void addToVisitors(dynamic item) => visitors.add(item);
|
||||
void removeFromVisitors(dynamic item) => visitors.remove(item);
|
||||
void removeAtIndexFromVisitors(int index) => visitors.removeAt(index);
|
||||
void insertAtIndexInVisitors(int index, dynamic item) => visitors.insert(index, item);
|
||||
void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) => visitors[index] = updateFn(visitors[index]);
|
||||
void insertAtIndexInVisitors(int index, dynamic item) =>
|
||||
visitors.insert(index, item);
|
||||
void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) =>
|
||||
visitors[index] = updateFn(visitors[index]);
|
||||
|
||||
List<String> docs = [];
|
||||
void addToDocs(String item) => docs.add(item);
|
||||
void removeFromDocs(String item) => docs.remove(item);
|
||||
void removeAtIndexFromDocs(int index) => docs.removeAt(index);
|
||||
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;
|
||||
TextEditingController? textController;
|
||||
|
@ -35,8 +39,10 @@ class VisitorSearchModalTemplateComponentModel extends FlutterFlowModel<VisitorS
|
|||
|
||||
Future<void> initDatabase() async {
|
||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
userUUID =
|
||||
(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;
|
||||
|
||||
@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;
|
||||
|
||||
safeSetState(VoidCallback callback) {
|
||||
|
@ -39,7 +42,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => VisitorSearchModalTemplateComponentModel());
|
||||
_model =
|
||||
createModel(context, () => VisitorSearchModalTemplateComponentModel());
|
||||
|
||||
_model.textController ??= TextEditingController();
|
||||
_model.textFieldFocusNode ??= FocusNode();
|
||||
|
@ -54,9 +58,12 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
final double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
final double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
final double limitedInputFontSize =
|
||||
LimitedFontSizeUtil.getInputFontSize(context);
|
||||
final double limitedHeaderFontSize =
|
||||
LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
final double limitedBodyFontSize =
|
||||
LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
||||
|
@ -76,7 +83,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
children: [],
|
||||
),
|
||||
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(
|
||||
controller: _model.textController,
|
||||
focusNode: _model.textFieldFocusNode,
|
||||
|
@ -94,45 +102,67 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
ptText: 'Documento do Visitante',
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
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(
|
||||
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(
|
||||
borderSide: BorderSide(color: FlutterFlowTheme.of(context).primary, width: 0.5),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary, width: 0.5),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(15.0), bottomRight: Radius.circular(15.0), topLeft: Radius.circular(15.0), topRight: Radius.circular(15.0)),
|
||||
bottomLeft: Radius.circular(15.0),
|
||||
bottomRight: Radius.circular(15.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0)),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: FlutterFlowTheme.of(context).error, width: 0.5),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error, width: 0.5),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(15.0), bottomRight: Radius.circular(15.0), topLeft: Radius.circular(15.0), topRight: Radius.circular(15.0)),
|
||||
bottomLeft: Radius.circular(15.0),
|
||||
bottomRight: Radius.circular(15.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0)),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: FlutterFlowTheme.of(context).error, width: 0.5),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error, width: 0.5),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(15.0), bottomRight: Radius.circular(15.0), topLeft: Radius.circular(15.0), topRight: Radius.circular(15.0)),
|
||||
bottomLeft: Radius.circular(15.0),
|
||||
bottomRight: Radius.circular(15.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0)),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
prefixIcon: Icon(Icons.search_outlined, color: FlutterFlowTheme.of(context).accent1),
|
||||
prefixIcon: Icon(Icons.search_outlined,
|
||||
color: FlutterFlowTheme.of(context).accent1),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
keyboardType: const TextInputType.numberWithOptions(signed: true),
|
||||
validator: _model.textControllerValidator.asValidator(context),
|
||||
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(RegExp('[0-9]'))
|
||||
],
|
||||
),
|
||||
),
|
||||
if (_model.visitors.isNotEmpty && _model.visitors.isNotEmpty)
|
||||
|
@ -141,26 +171,32 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
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(
|
||||
FFLocalizations.of(context).getText('9coywebh'),
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedHeaderFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
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(
|
||||
_model.visitors.length.toString(),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedHeaderFontSize,
|
||||
),
|
||||
),
|
||||
|
@ -172,7 +208,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
builder: (context) {
|
||||
if (_model.visitors.isNotEmpty) {
|
||||
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(
|
||||
builder: (context) {
|
||||
final visitor = _model.visitors.map((e) => e).toList();
|
||||
|
@ -185,7 +222,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
final visitorItem = visitor[visitorIndex];
|
||||
final docItem = doc[visitorIndex];
|
||||
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(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
|
@ -194,19 +232,24 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
child: Container(
|
||||
width: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(40.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(40.0),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration: const Duration(milliseconds: 500),
|
||||
fadeOutDuration: const Duration(milliseconds: 500),
|
||||
fadeInDuration: const Duration(
|
||||
milliseconds: 500),
|
||||
fadeOutDuration: const Duration(
|
||||
milliseconds: 500),
|
||||
imageUrl:
|
||||
"https://freaccess.com.br/freaccess/getImage.php?devUUID=${_model.devUUID}&userUUID=${_model.userUUID}&cliID=${_model.cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||
visitorItem,
|
||||
|
@ -220,21 +263,40 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
Expanded(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
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(
|
||||
valueOrDefault<String>(
|
||||
getJsonField(visitorItem, r'''$.VTE_NOME''')?.toString(),
|
||||
getJsonField(visitorItem,
|
||||
r'''$.VTE_NOME''')
|
||||
?.toString(),
|
||||
'NOT FOUND',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyLargeFamily,
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyLargeFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyLargeFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyLargeFamily),
|
||||
fontSize:
|
||||
limitedBodyFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -245,9 +307,14 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
borderRadius: 20.0,
|
||||
borderWidth: 1.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 {
|
||||
_model.removeFromVisitors(visitorItem);
|
||||
_model.removeFromVisitors(
|
||||
visitorItem);
|
||||
_model.removeFromDocs(docItem);
|
||||
safeSetState(() {});
|
||||
},
|
||||
|
@ -267,7 +334,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
return Container(
|
||||
width: 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: [
|
||||
FFButtonWidget(
|
||||
onPressed: MediaQuery.of(context).viewInsets.bottom > 0
|
||||
? () async => await addVisitor(context).whenComplete(safeSetState(() {}))
|
||||
? () async => await addVisitor(context)
|
||||
.whenComplete(safeSetState(() {}))
|
||||
: () async => await sendVisitors(context),
|
||||
text: MediaQuery.of(context).viewInsets.bottom > 0
|
||||
? FFLocalizations.of(context).getVariableText(
|
||||
|
@ -293,20 +362,28 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
options: FFButtonOptions(
|
||||
width: MediaQuery.of(context).size.width * 0.4,
|
||||
height: 40,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).titleSmallFamily,
|
||||
color: Colors.white,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
||||
borderRadius:
|
||||
const BorderRadius.only(bottomLeft: Radius.circular(15), bottomRight: Radius.circular(15), topLeft: Radius.circular(15), topRight: Radius.circular(15)),
|
||||
borderSide:
|
||||
const BorderSide(color: Colors.transparent, width: 1.0),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(15),
|
||||
bottomRight: Radius.circular(15),
|
||||
topLeft: Radius.circular(15),
|
||||
topRight: Radius.circular(15)),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -326,23 +403,36 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
Future<void> addVisitor(BuildContext context) async {
|
||||
safeSetState(() {
|
||||
_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' &&
|
||||
PhpGroup.getVisitorByDocCall.error((_model.getVisitorByDoc?.jsonBody ?? '')) == false &&
|
||||
PhpGroup.getVisitorByDocCall.vistanteId((_model.getVisitorByDoc?.jsonBody ?? '')) != null) {
|
||||
String newDoc = _model.textController.text.replaceFirst(RegExp(r'^0+'), '');
|
||||
if (PhpGroup.getVisitorByDocCall
|
||||
.vistanteId((_model.getVisitorByDoc?.jsonBody ?? '')) !=
|
||||
'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);
|
||||
if (existDoc == false) {
|
||||
_model.addToVisitors(PhpGroup.getVisitorByDocCall.visitante((_model.getVisitorByDoc?.jsonBody ?? '')));
|
||||
_model.addToVisitors(PhpGroup.getVisitorByDocCall
|
||||
.visitante((_model.getVisitorByDoc?.jsonBody ?? '')));
|
||||
safeSetState(() {});
|
||||
_model.addToDocs(_model.textController.text.replaceFirst(RegExp(r'^0+'), ''));
|
||||
_model.addToDocs(
|
||||
_model.textController.text.replaceFirst(RegExp(r'^0+'), ''));
|
||||
safeSetState(() {});
|
||||
} else if (existDoc == true) {
|
||||
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,
|
||||
backgroundColor: Colors.red,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context));
|
||||
|
@ -353,7 +443,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
context: context,
|
||||
builder: (context) {
|
||||
return Dialog(
|
||||
child: VisitorNotFoundComponentWidget(doc: _model.textController.text),
|
||||
child:
|
||||
VisitorNotFoundComponentWidget(doc: _model.textController.text),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
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';
|
||||
|
||||
class WelcomeTemplateComponentModel extends FlutterFlowModel<WelcomeTemplateComponentWidget> {
|
||||
class WelcomeTemplateComponentModel
|
||||
extends FlutterFlowModel<WelcomeTemplateComponentWidget> {
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
|
|
|
@ -23,10 +23,13 @@ class WelcomeTemplateComponentWidget extends StatefulWidget {
|
|||
final Future Function()? toggleSignInPage;
|
||||
|
||||
@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;
|
||||
final animationsMap = <String, AnimationInfo>{};
|
||||
|
||||
|
@ -87,8 +90,10 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
double limitedHeaderFontSize =
|
||||
LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedSubHeaderFontSize =
|
||||
LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
|
||||
return Align(
|
||||
|
@ -104,7 +109,8 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(context).getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
|
||||
FFLocalizations.of(context)
|
||||
.getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
|
@ -112,13 +118,15 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText('5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
|
||||
FFLocalizations.of(context).getText(
|
||||
'5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
|
@ -126,7 +134,8 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
fontSize: limitedSubHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
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(),
|
||||
child: ClipRRect(
|
||||
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: [
|
||||
Builder(
|
||||
builder: (context) {
|
||||
if (MediaQuery.sizeOf(context).width < kBreakpointSmall ? true : false) {
|
||||
if (MediaQuery.sizeOf(context).width <
|
||||
kBreakpointSmall
|
||||
? true
|
||||
: false) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('toggleSignInPage'),
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignInPage'),
|
||||
onPressed: () async {
|
||||
await widget.toggleSignInPage?.call();
|
||||
},
|
||||
text: FFLocalizations.of(context).getText('dynet730' /* Entrar */),
|
||||
text: FFLocalizations.of(context)
|
||||
.getText('dynet730' /* Entrar */),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
textStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.info,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('toggleSignUpPage'),
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignUpPage'),
|
||||
onPressed: () async {
|
||||
await widget.toggleSignUpPage?.call();
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
text:
|
||||
FFLocalizations.of(context).getText(
|
||||
'hha60cg7' /* Cadastrar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.customColor1,
|
||||
textStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
),
|
||||
|
@ -250,39 +297,59 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
} else {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Expanded(
|
||||
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(
|
||||
key: const ValueKey<String>('toggleSignInPage'),
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignInPage'),
|
||||
onPressed: () async {
|
||||
await widget.toggleSignInPage?.call();
|
||||
await widget.toggleSignInPage
|
||||
?.call();
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
text: FFLocalizations.of(context)
|
||||
.getText(
|
||||
'zvtay8ee' /* Entrar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
textStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.info,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
),
|
||||
|
@ -290,35 +357,54 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
),
|
||||
Expanded(
|
||||
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(
|
||||
key: const ValueKey<String>('toggleSignUpPage'),
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignUpPage'),
|
||||
onPressed: () async {
|
||||
await widget.toggleSignUpPage?.call();
|
||||
await widget.toggleSignUpPage
|
||||
?.call();
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
text: FFLocalizations.of(context)
|
||||
.getText(
|
||||
'o6zob50a' /* Cadastrar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
textStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.info,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
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');
|
||||
} else {
|
||||
await StorageHelper().set(SecureStorageKey.isLogged.value, true);
|
||||
context.go('/homePage', extra: {'update': LocalsRepositoryImpl().update});
|
||||
context
|
||||
.go('/homePage', extra: {'update': LocalsRepositoryImpl().update});
|
||||
}
|
||||
} catch (e, s) {
|
||||
await DialogUtil.errorDefault(context);
|
||||
|
@ -50,7 +51,8 @@ class AuthenticationService {
|
|||
final ApiCallResponse? response;
|
||||
final LoginCall callback = PhpGroup.loginCall;
|
||||
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 userUUID;
|
||||
|
@ -77,7 +79,8 @@ class AuthenticationService {
|
|||
userName = response.jsonBody['user']['name'];
|
||||
|
||||
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.userName.key, userName);
|
||||
|
||||
|
@ -86,14 +89,16 @@ class AuthenticationService {
|
|||
if (response.jsonBody['error'] == null) {
|
||||
await DialogUtil.errorDefault(context);
|
||||
} else {
|
||||
await DialogUtil.error(context, response.jsonBody['error_msg'].toString());
|
||||
await DialogUtil.error(
|
||||
context, response.jsonBody['error_msg'].toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
} catch (e, s) {
|
||||
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 {
|
||||
try {
|
||||
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(
|
||||
name: name,
|
||||
password: passwd,
|
||||
|
@ -126,7 +133,8 @@ class AuthenticationService {
|
|||
}
|
||||
} catch (e, s) {
|
||||
await DialogUtil.errorDefault(context);
|
||||
LogUtil.requestAPIFailed('registro.php', email.toString(), "Register", e, s);
|
||||
LogUtil.requestAPIFailed(
|
||||
'registro.php', email.toString(), "Register", e, s);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -154,7 +162,9 @@ class AuthenticationService {
|
|||
try {
|
||||
final ApiCallResponse? response;
|
||||
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);
|
||||
|
||||
|
@ -167,14 +177,17 @@ class AuthenticationService {
|
|||
}
|
||||
} catch (e, s) {
|
||||
await DialogUtil.errorDefault(context);
|
||||
LogUtil.requestAPIFailed('forgotPassword.php', email, "Forgot Password", e, s);
|
||||
LogUtil.requestAPIFailed(
|
||||
'forgotPassword.php', email, "Forgot Password", e, s);
|
||||
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 {
|
||||
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) {
|
||||
final String message = FFLocalizations.of(context).getVariableText(
|
||||
|
@ -190,7 +203,8 @@ class AuthenticationService {
|
|||
}
|
||||
} catch (e, s) {
|
||||
await DialogUtil.errorDefault(context);
|
||||
LogUtil.requestAPIFailed('changePassword.php', email, "Change Password", e, s);
|
||||
LogUtil.requestAPIFailed(
|
||||
'changePassword.php', email, "Change Password", e, s);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,17 +27,20 @@ class PhpGroup {
|
|||
static ForgotPasswordCall forgotPasswordCall = ForgotPasswordCall();
|
||||
static ChangePasswordCall changePasswordCall = ChangePasswordCall();
|
||||
static GetLocalsCall getLocalsCall = GetLocalsCall();
|
||||
static PostScheduleVisitorCall postScheduleVisitorCall = PostScheduleVisitorCall();
|
||||
static PostScheduleVisitorCall postScheduleVisitorCall =
|
||||
PostScheduleVisitorCall();
|
||||
static PostScheduleVisitCall postScheduleVisitCall = PostScheduleVisitCall();
|
||||
static GetScheduleVisitCall getScheduleVisitCall = GetScheduleVisitCall();
|
||||
static GetDadosCall getDadosCall = GetDadosCall();
|
||||
static GetVisitorByDocCall getVisitorByDocCall = GetVisitorByDocCall();
|
||||
static GetFotoVisitanteCall getFotoVisitanteCall = GetFotoVisitanteCall();
|
||||
static PostProvVisitSchedulingCall postProvVisitSchedulingCall = PostProvVisitSchedulingCall();
|
||||
static PostProvVisitSchedulingCall postProvVisitSchedulingCall =
|
||||
PostProvVisitSchedulingCall();
|
||||
static GetVisitsCall getVisitsCall = GetVisitsCall();
|
||||
static DeleteVisitCall deleteVisitCall = DeleteVisitCall();
|
||||
static GetPessoasLocalCall getPessoasLocalCall = GetPessoasLocalCall();
|
||||
static RespondeSolicitacaoCall respondeSolicitacaoCall = RespondeSolicitacaoCall();
|
||||
static RespondeSolicitacaoCall respondeSolicitacaoCall =
|
||||
RespondeSolicitacaoCall();
|
||||
static GetAccessCall getAccessCall = GetAccessCall();
|
||||
static GetLiberationsCall getLiberationsCall = GetLiberationsCall();
|
||||
static GetMessagesCall getMessagesCall = GetMessagesCall();
|
||||
|
@ -56,7 +59,8 @@ class PhpGroup {
|
|||
static GetPetPhoto getPetPhoto = GetPetPhoto();
|
||||
static UnregisterDevice unregisterDevice = UnregisterDevice();
|
||||
static GetVehiclesByProperty getVehiclesByProperty = GetVehiclesByProperty();
|
||||
static GetResidentsByProperty getResidentsByProperty = GetResidentsByProperty();
|
||||
static GetResidentsByProperty getResidentsByProperty =
|
||||
GetResidentsByProperty();
|
||||
static GetOpenedVisits getOpenedVisits = GetOpenedVisits();
|
||||
static GetLicense getLicense = GetLicense();
|
||||
static GetProvSchedules getProvSchedules = GetProvSchedules();
|
||||
|
@ -65,9 +69,12 @@ class PhpGroup {
|
|||
class GetProvSchedules {
|
||||
Future<ApiCallResponse> call(final String page, final String status) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.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 pageSize = '10';
|
||||
final bool isFiltered = status != '' && status != '.*';
|
||||
|
@ -100,9 +107,12 @@ class GetProvSchedules {
|
|||
class GetOpenedVisits {
|
||||
Future<ApiCallResponse> call(final String page) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.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 pageSize = '10';
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -132,9 +142,12 @@ class GetOpenedVisits {
|
|||
class GetResidentsByProperty {
|
||||
Future<ApiCallResponse> call(final String page) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID = await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? '';
|
||||
final String userUUID = await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? '';
|
||||
final String cliID = await StorageHelper().get(ProfileStorageKey.clientUUID.key) ?? '';
|
||||
final String devUUID =
|
||||
await StorageHelper().get(ProfileStorageKey.devUUID.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 pageSize = '10';
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -163,9 +176,12 @@ class GetResidentsByProperty {
|
|||
class GetVehiclesByProperty {
|
||||
Future<ApiCallResponse> call(final String page) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.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 pageSize = '10';
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -196,9 +212,12 @@ class GetVehiclesByProperty {
|
|||
class GetLicense {
|
||||
Future<ApiCallResponse> call() async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
callName: 'getLicense',
|
||||
|
@ -227,8 +246,10 @@ class GetLicense {
|
|||
class UnregisterDevice {
|
||||
Future<ApiCallResponse> call() async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
callName: 'unregisterDevice',
|
||||
|
@ -255,9 +276,12 @@ class UnregisterDevice {
|
|||
class DeletePet {
|
||||
Future<ApiCallResponse> call({final int? petID = 0}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'excluirPet';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -300,9 +324,12 @@ class UpdatePet {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'atualizarPet';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -323,7 +350,9 @@ class UpdatePet {
|
|||
'species': species,
|
||||
'breed': breed,
|
||||
if (color != '') 'color': color,
|
||||
if (birthdayDate != '') 'birthdayDate': ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!),
|
||||
if (birthdayDate != '')
|
||||
'birthdayDate':
|
||||
ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!),
|
||||
'gender': gender,
|
||||
'size': size,
|
||||
if (notes != '') 'notes': notes,
|
||||
|
@ -346,9 +375,12 @@ class GetPets {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'consultaPets';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -380,9 +412,12 @@ class GetPetPhoto {
|
|||
Future<ApiCallResponse> call({final int? petId}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'consultaFotoPet';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -423,9 +458,12 @@ class RegisterPet {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'cadastrarPet';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -445,7 +483,9 @@ class RegisterPet {
|
|||
'species': species,
|
||||
'breed': breed,
|
||||
if (color != '') 'color': color,
|
||||
if (birthdayDate != '') 'birthdayDate': ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!),
|
||||
if (birthdayDate != '')
|
||||
'birthdayDate':
|
||||
ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!),
|
||||
'gender': gender,
|
||||
'size': size,
|
||||
if (notes != '') 'notes': notes,
|
||||
|
@ -468,9 +508,12 @@ class BuscaEnconcomendas {
|
|||
final String? adresseeType,
|
||||
final String? status,
|
||||
}) async {
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'getEncomendas';
|
||||
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
@ -512,9 +555,12 @@ class CancelaVisita {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'cancelaVisita';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -546,8 +592,10 @@ class CancelaVisita {
|
|||
|
||||
class DeleteAccount {
|
||||
Future<ApiCallResponse> call() async {
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -578,9 +626,12 @@ class ChangePanic {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'updVisitado';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -614,9 +665,12 @@ class ChangePass {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'updVisitado';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -650,9 +704,12 @@ class RespondeVinculo {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
callName: 'respondeVinculo',
|
||||
|
@ -684,9 +741,12 @@ class ChangeNotifica {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'updVisitado';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -718,10 +778,14 @@ class UpdateIDE {
|
|||
Future<ApiCallResponse> call() async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String newIde = (await StorageHelper().get(ProfileStorageKey.userDevUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(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';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -753,9 +817,12 @@ class UpdToken {
|
|||
Future<ApiCallResponse> call() async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String token = (await StorageHelper().get(SecureStorageKey.token.value)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String token =
|
||||
(await StorageHelper().get(SecureStorageKey.token.value)) ?? '';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
callName: 'updToken',
|
||||
|
@ -782,11 +849,17 @@ class UpdToken {
|
|||
class LoginCall {
|
||||
Future<ApiCallResponse> call() async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String email = (await StorageHelper().get(SecureStorageKey.email.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)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String email =
|
||||
(await StorageHelper().get(SecureStorageKey.email.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;
|
||||
try {
|
||||
token = await FirebaseMessagingService.getToken();
|
||||
|
@ -869,9 +942,12 @@ class ChangePasswordCall {
|
|||
required final String psswd,
|
||||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
callName: 'changePassword',
|
||||
|
@ -930,8 +1006,10 @@ class GetLocalsCall {
|
|||
Future<ApiCallResponse> call() async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? '';
|
||||
final String userUUID = await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? '';
|
||||
final String devUUID =
|
||||
await StorageHelper().get(ProfileStorageKey.devUUID.key) ?? '';
|
||||
final String userUUID =
|
||||
await StorageHelper().get(ProfileStorageKey.userUUID.key) ?? '';
|
||||
|
||||
return await ApiManager.instance
|
||||
.makeApiCall(
|
||||
|
@ -972,9 +1050,12 @@ class PostScheduleVisitorCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'putVisitante';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -1027,9 +1108,12 @@ class PostScheduleVisitCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'putVisita';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -1081,9 +1165,12 @@ class GetScheduleVisitCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'getVisitas';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -1355,9 +1442,12 @@ class GetDadosCall {
|
|||
Future<ApiCallResponse> call() async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'getDados';
|
||||
|
||||
return await ApiManager.instance
|
||||
|
@ -1393,7 +1483,8 @@ class GetDadosCall {
|
|||
response,
|
||||
r'''$.error_msg''',
|
||||
));
|
||||
String? visitedDesNomeStr(dynamic response) => castToType<String>(getJsonField(
|
||||
String? visitedDesNomeStr(dynamic response) =>
|
||||
castToType<String>(getJsonField(
|
||||
response,
|
||||
r'''$.visitado.DES_NOME''',
|
||||
));
|
||||
|
@ -1401,27 +1492,33 @@ class GetDadosCall {
|
|||
response,
|
||||
r'''$.visitado.VDO_ID''',
|
||||
));
|
||||
String? visitedVDOTNomeStr(dynamic response) => castToType<String>(getJsonField(
|
||||
String? visitedVDOTNomeStr(dynamic response) =>
|
||||
castToType<String>(getJsonField(
|
||||
response,
|
||||
r'''$.visitado.VDO_NOME''',
|
||||
));
|
||||
String? visitedVDOTipoStr(dynamic response) => castToType<String>(getJsonField(
|
||||
String? visitedVDOTipoStr(dynamic response) =>
|
||||
castToType<String>(getJsonField(
|
||||
response,
|
||||
r'''$.visitado.VDO_TIPO''',
|
||||
));
|
||||
String? visitedVDOImeiStr(dynamic response) => castToType<String>(getJsonField(
|
||||
String? visitedVDOImeiStr(dynamic response) =>
|
||||
castToType<String>(getJsonField(
|
||||
response,
|
||||
r'''$.visitado.VDO_IMEI''',
|
||||
));
|
||||
String? visitedVDODocumentoStr(dynamic response) => castToType<String>(getJsonField(
|
||||
String? visitedVDODocumentoStr(dynamic response) =>
|
||||
castToType<String>(getJsonField(
|
||||
response,
|
||||
r'''$.visitado.VDO_DOCUMENTO''',
|
||||
));
|
||||
String? visitedVDOEmailStr(dynamic response) => castToType<String>(getJsonField(
|
||||
String? visitedVDOEmailStr(dynamic response) =>
|
||||
castToType<String>(getJsonField(
|
||||
response,
|
||||
r'''$.visitado.VDO_EMAIL''',
|
||||
));
|
||||
String? visitedVDOStatusWebStr(dynamic response) => castToType<String>(getJsonField(
|
||||
String? visitedVDOStatusWebStr(dynamic response) =>
|
||||
castToType<String>(getJsonField(
|
||||
response,
|
||||
r'''$.visitado.VDO_STATUSWEB''',
|
||||
));
|
||||
|
@ -1469,7 +1566,8 @@ class GetDadosCall {
|
|||
response,
|
||||
r'''$.visitado.DES_ID''',
|
||||
));
|
||||
String? visitedVDoNotTerceirosStr(dynamic response) => castToType<String>(getJsonField(
|
||||
String? visitedVDoNotTerceirosStr(dynamic response) =>
|
||||
castToType<String>(getJsonField(
|
||||
response,
|
||||
r'''$.visitado.VDO_NOTTERCEIROS''',
|
||||
));
|
||||
|
@ -1538,7 +1636,8 @@ class GetDadosCall {
|
|||
.map((x) => castToType<String>(x))
|
||||
.withoutNulls
|
||||
.toList();
|
||||
List<String>? levelNACIndPermiteReentradaStrList(dynamic response) => (getJsonField(
|
||||
List<String>? levelNACIndPermiteReentradaStrList(dynamic response) =>
|
||||
(getJsonField(
|
||||
response,
|
||||
r'''$.niveis[:].NAC_INDPERMITEREENTRADA''',
|
||||
true,
|
||||
|
@ -1556,7 +1655,8 @@ class GetDadosCall {
|
|||
.map((x) => castToType<String>(x))
|
||||
.withoutNulls
|
||||
.toList();
|
||||
List<String>? levelNACTempoAntiCaronaStrList(dynamic response) => (getJsonField(
|
||||
List<String>? levelNACTempoAntiCaronaStrList(dynamic response) =>
|
||||
(getJsonField(
|
||||
response,
|
||||
r'''$.niveis[:].NAC_TEMPOANTICARONA''',
|
||||
true,
|
||||
|
@ -1590,9 +1690,12 @@ class GetVisitorByDocCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'getVisitante';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -1644,9 +1747,12 @@ class GetFotoVisitanteCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'getFotoVisitante';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -1683,9 +1789,12 @@ class PostProvVisitSchedulingCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'putAgendamentoProv';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -1732,9 +1841,12 @@ class GetVisitsCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'getVisitas';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -1995,9 +2107,12 @@ class DeleteVisitCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'cancelaVisita';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -2038,10 +2153,14 @@ class GetPessoasLocalCall {
|
|||
Future<ApiCallResponse> call() async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String ownerUUID = (await StorageHelper().get(ProfileStorageKey.ownerUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String ownerUUID =
|
||||
(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(
|
||||
callName: 'getPessoasLocal',
|
||||
|
@ -2104,9 +2223,12 @@ class RespondeSolicitacaoCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'respondeSolicitacao';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -2154,9 +2276,12 @@ class GetAccessCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'getAcessos';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -2403,9 +2528,12 @@ class GetLiberationsCall {
|
|||
final StreamController<ApiCallResponse> controller = StreamController();
|
||||
|
||||
Future.microtask(() async {
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'getSolicitacoes';
|
||||
|
||||
try {
|
||||
|
@ -2595,9 +2723,12 @@ class GetMessagesCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
final String cliUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
const String atividade = 'getMensagens';
|
||||
|
||||
return await ApiManager.instance.makeApiCall(
|
||||
|
@ -2641,7 +2772,8 @@ class ApiPagingParams {
|
|||
});
|
||||
|
||||
@override
|
||||
String toString() => 'PagingParams(nextPageNumber: $nextPageNumber, numItems: $numItems, lastResponse: $lastResponse,)';
|
||||
String toString() =>
|
||||
'PagingParams(nextPageNumber: $nextPageNumber, numItems: $numItems, lastResponse: $lastResponse,)';
|
||||
}
|
||||
|
||||
String _toEncodable(dynamic item) {
|
||||
|
|
|
@ -107,7 +107,9 @@ class ApiCallResponse {
|
|||
final Object? exception;
|
||||
bool get succeeded => statusCode >= 200 && statusCode < 300;
|
||||
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();
|
||||
|
||||
static ApiCallResponse fromHttpResponse(
|
||||
|
@ -121,7 +123,9 @@ class ApiCallResponse {
|
|||
if (bodyType == BodyType.BLOB) {
|
||||
jsonBody = response.bodyBytes;
|
||||
} 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;
|
||||
}
|
||||
} 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'],
|
||||
ApiManager.toStringMap(response['headers'] ?? {}),
|
||||
response['statusCode'] ?? 400,
|
||||
|
@ -150,14 +155,17 @@ class ApiManager {
|
|||
|
||||
static String? _accessToken;
|
||||
|
||||
static void clearCache(String callName) =>
|
||||
_apiCache.keys.toSet().forEach((k) => k.callName == callName ? _apiCache.remove(k) : null);
|
||||
static void clearCache(String callName) => _apiCache.keys
|
||||
.toSet()
|
||||
.forEach((k) => k.callName == callName ? _apiCache.remove(k) : null);
|
||||
|
||||
static Map<String, String> toStringMap(Map map) =>
|
||||
map.map((key, value) => MapEntry(key.toString(), value.toString()));
|
||||
|
||||
static String asQueryParams(Map<String, dynamic> map) =>
|
||||
map.entries.map((e) => "${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value.toString())}").join('&');
|
||||
static String asQueryParams(Map<String, dynamic> map) => map.entries
|
||||
.map((e) =>
|
||||
"${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value.toString())}")
|
||||
.join('&');
|
||||
|
||||
static Future<ApiCallResponse> urlRequest(
|
||||
ApiCallType callType,
|
||||
|
@ -171,13 +179,15 @@ class ApiManager {
|
|||
BodyType? bodyType,
|
||||
}) async {
|
||||
if (params.isNotEmpty) {
|
||||
final specifier = Uri.parse(apiUrl).queryParameters.isNotEmpty ? '&' : '?';
|
||||
final specifier =
|
||||
Uri.parse(apiUrl).queryParameters.isNotEmpty ? '&' : '?';
|
||||
apiUrl = '$apiUrl$specifier${asQueryParams(params)}';
|
||||
}
|
||||
if (isStreamingApi) {
|
||||
client ??= http.Client();
|
||||
final request = http.Request(callType.toString().split('.').last, Uri.parse(apiUrl))
|
||||
..headers.addAll(toStringMap(headers));
|
||||
final request =
|
||||
http.Request(callType.toString().split('.').last, Uri.parse(apiUrl))
|
||||
..headers.addAll(toStringMap(headers));
|
||||
final streamedResponse = await getStreamedResponse(request);
|
||||
return ApiCallResponse(
|
||||
null,
|
||||
|
@ -189,8 +199,10 @@ class ApiManager {
|
|||
final makeRequest = callType == ApiCallType.GET
|
||||
? (client != null ? client.get : http.get)
|
||||
: (client != null ? client.delete : http.delete);
|
||||
final response = await makeRequest(Uri.parse(apiUrl), headers: toStringMap(headers));
|
||||
return ApiCallResponse.fromHttpResponse(response, returnBody, decodeUtf8, bodyType);
|
||||
final response =
|
||||
await makeRequest(Uri.parse(apiUrl), headers: toStringMap(headers));
|
||||
return ApiCallResponse.fromHttpResponse(
|
||||
response, returnBody, decodeUtf8, bodyType);
|
||||
}
|
||||
|
||||
static Future<ApiCallResponse> requestWithBody(
|
||||
|
@ -212,11 +224,13 @@ class ApiManager {
|
|||
(alwaysAllowBody && type == ApiCallType.DELETE),
|
||||
'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) {
|
||||
client ??= http.Client();
|
||||
final request = http.Request(type.toString().split('.').last, Uri.parse(apiUrl))
|
||||
..headers.addAll(toStringMap(headers));
|
||||
final request =
|
||||
http.Request(type.toString().split('.').last, Uri.parse(apiUrl))
|
||||
..headers.addAll(toStringMap(headers));
|
||||
request.body = postBody;
|
||||
final streamedResponse = await getStreamedResponse(request);
|
||||
return ApiCallResponse(
|
||||
|
@ -228,7 +242,8 @@ class ApiManager {
|
|||
}
|
||||
|
||||
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 = {
|
||||
|
@ -237,8 +252,10 @@ class ApiManager {
|
|||
ApiCallType.PATCH: client != null ? client.patch : http.patch,
|
||||
ApiCallType.DELETE: client != null ? client.delete : http.delete,
|
||||
}[type]!;
|
||||
final response = await requestFn(Uri.parse(apiUrl), headers: toStringMap(headers), body: postBody);
|
||||
return ApiCallResponse.fromHttpResponse(response, returnBody, decodeUtf8, bodyType);
|
||||
final response = await requestFn(Uri.parse(apiUrl),
|
||||
headers: toStringMap(headers), body: postBody);
|
||||
return ApiCallResponse.fromHttpResponse(
|
||||
response, returnBody, decodeUtf8, bodyType);
|
||||
}
|
||||
|
||||
static Future<ApiCallResponse> multipartRequest(
|
||||
|
@ -258,14 +275,19 @@ class ApiManager {
|
|||
);
|
||||
|
||||
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 = [];
|
||||
params.entries.where((e) => isFile(e.value)).forEach((e) {
|
||||
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) {
|
||||
files.add(
|
||||
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))
|
||||
..files.addAll(files);
|
||||
nonFileParams.forEach((key, value) => request.fields[key] = value);
|
||||
|
||||
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) {
|
||||
|
@ -333,10 +357,13 @@ class ApiManager {
|
|||
case null:
|
||||
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;
|
||||
}
|
||||
return encodeBodyUtf8 && postBody is String ? utf8.encode(postBody) : postBody;
|
||||
return encodeBodyUtf8 && postBody is String
|
||||
? utf8.encode(postBody)
|
||||
: postBody;
|
||||
}
|
||||
|
||||
Future<ApiCallResponse> call(ApiCallOptions options) => makeApiCall(
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
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> {
|
||||
T? deserialize(String? value) => firstWhereOrNull((e) => e.serialize() == value);
|
||||
T? deserialize(String? value) =>
|
||||
firstWhereOrNull((e) => e.serialize() == value);
|
||||
}
|
||||
|
||||
T? deserializeEnum<T>(String? value) {
|
||||
|
|
|
@ -41,7 +41,8 @@ class DeviceStruct extends BaseStruct {
|
|||
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() => {
|
||||
'devUUID': _devUUID,
|
||||
|
@ -65,7 +66,8 @@ class DeviceStruct extends BaseStruct {
|
|||
),
|
||||
}.withoutNulls;
|
||||
|
||||
static DeviceStruct fromSerializableMap(Map<String, dynamic> data) => DeviceStruct(
|
||||
static DeviceStruct fromSerializableMap(Map<String, dynamic> data) =>
|
||||
DeviceStruct(
|
||||
devUUID: deserializeParam(
|
||||
data['devUUID'],
|
||||
ParamType.String,
|
||||
|
@ -88,11 +90,15 @@ class DeviceStruct extends BaseStruct {
|
|||
|
||||
@override
|
||||
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
|
||||
int get hashCode => const ListEquality().hash([devUUID, version, description]);
|
||||
int get hashCode =>
|
||||
const ListEquality().hash([devUUID, version, description]);
|
||||
}
|
||||
|
||||
DeviceStruct createDeviceStruct({
|
||||
|
|
|
@ -33,7 +33,10 @@ dynamic deserializeStructParam<T>(
|
|||
if (paramValues is! Iterable) {
|
||||
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>) {
|
||||
return structBuilder(param);
|
||||
} else {
|
||||
|
@ -50,9 +53,16 @@ List<T>? getStructList<T>(
|
|||
dynamic value,
|
||||
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
|
||||
? fromCssColor(value)
|
||||
|
@ -60,6 +70,8 @@ Color? getSchemaColor(dynamic value) => value is String
|
|||
? value
|
||||
: 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,
|
||||
);
|
||||
void clearAccessHistoryCache() => _accessHistoryManager.clear();
|
||||
void clearAccessHistoryCacheKey(String? uniqueKey) => _accessHistoryManager.clearRequest(uniqueKey);
|
||||
void clearAccessHistoryCacheKey(String? uniqueKey) =>
|
||||
_accessHistoryManager.clearRequest(uniqueKey);
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {
|
||||
|
@ -32,8 +33,10 @@ class AcessHistoryPageModel extends FlutterFlowModel<AccessHistoryScreen> {
|
|||
|
||||
Future<void> initDatabase() async {
|
||||
devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
userUUID = (await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
cliUUID = (await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
userUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.userUUID.key)) ?? '';
|
||||
cliUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.clientUUID.key)) ?? '';
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -33,8 +33,11 @@ class ProvisionalHistoryStateBloc {
|
|||
}
|
||||
}
|
||||
|
||||
class ProvisionalHistoryBloc extends Bloc<ProvisionalHistoryEvent, ProvisionalHistoryStateBloc> {
|
||||
ProvisionalHistoryBloc() : super(ProvisionalHistoryStateBloc(devUUID: '', userUUID: '', cliUUID: '')) {
|
||||
class ProvisionalHistoryBloc
|
||||
extends Bloc<ProvisionalHistoryEvent, ProvisionalHistoryStateBloc> {
|
||||
ProvisionalHistoryBloc()
|
||||
: super(ProvisionalHistoryStateBloc(
|
||||
devUUID: '', userUUID: '', cliUUID: '')) {
|
||||
on<LoadProvisionalHistory>(_onLoadProvisionalHistory);
|
||||
}
|
||||
|
||||
|
@ -43,9 +46,16 @@ class ProvisionalHistoryBloc extends Bloc<ProvisionalHistoryEvent, ProvisionalHi
|
|||
Emitter<ProvisionalHistoryStateBloc> emit,
|
||||
) async {
|
||||
emit(state.copyWith(isLoading: true));
|
||||
final devUUID = (await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final userUUID = (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));
|
||||
final devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
final userUUID =
|
||||
(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;
|
||||
List<dynamic> _accessWrap = [];
|
||||
|
||||
_AccessHistoryState(Map<String, String> opt) : selectedTypeSubject = BehaviorSubject.seeded(opt) {
|
||||
_AccessHistoryState(Map<String, String> opt)
|
||||
: selectedTypeSubject = BehaviorSubject.seeded(opt) {
|
||||
selectedTypeSubject.listen((value) {});
|
||||
}
|
||||
|
||||
|
@ -53,7 +54,8 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
|||
|
||||
_scrollController = ScrollController()
|
||||
..addListener(() {
|
||||
if (_scrollController.position.atEdge && _scrollController.position.pixels != 0) {
|
||||
if (_scrollController.position.atEdge &&
|
||||
_scrollController.position.pixels != 0) {
|
||||
_loadMoreAccess();
|
||||
}
|
||||
});
|
||||
|
@ -113,7 +115,8 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
|||
color: theme.primaryText,
|
||||
fontSize: 16.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(
|
||||
icon: const Icon(Icons.filter_list),
|
||||
onPressed: () async {
|
||||
final Map<String, String>? selectedFilter = await showModalBottomSheet<Map<String, String>>(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => Navigator.of(context).pop(),
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: GestureDetector(
|
||||
onTap: () {},
|
||||
child: FilterWidget(
|
||||
defaultSelections: selectedTypeSubject.value,
|
||||
filterOptions: {
|
||||
'personType': [
|
||||
{
|
||||
'title': FFLocalizations.of(context).getText('zok7lu4w'),
|
||||
'value': 'E',
|
||||
final Map<String, String>? selectedFilter =
|
||||
await showModalBottomSheet<Map<String, String>>(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => Navigator.of(context).pop(),
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: GestureDetector(
|
||||
onTap: () {},
|
||||
child: FilterWidget(
|
||||
defaultSelections: selectedTypeSubject.value,
|
||||
filterOptions: {
|
||||
'personType': [
|
||||
{
|
||||
'title': FFLocalizations.of(context)
|
||||
.getText('zok7lu4w'),
|
||||
'value': 'E',
|
||||
},
|
||||
{
|
||||
'title': FFLocalizations.of(context)
|
||||
.getText('oonqk812'),
|
||||
'value': 'O',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'title': FFLocalizations.of(context).getText('oonqk812'),
|
||||
'value': 'O',
|
||||
},
|
||||
],
|
||||
},
|
||||
filterTitles: {'personType': ''},
|
||||
filterTitles: {'personType': ''},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
);
|
||||
});
|
||||
|
||||
if (selectedFilter != null) {
|
||||
_updateAccessHistoryAction(selectedFilter);
|
||||
|
@ -200,7 +206,8 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
|||
final List<dynamic> accessHistory = response.jsonBody['acessos'] ?? [];
|
||||
|
||||
List<dynamic> filteredAccess = accessHistory.where((item) {
|
||||
final personTypeMatches = _personType == '.*' || item["PES_TIPO"].toString() == _personType;
|
||||
final personTypeMatches =
|
||||
_personType == '.*' || item["PES_TIPO"].toString() == _personType;
|
||||
return personTypeMatches;
|
||||
}).toList();
|
||||
|
||||
|
@ -233,7 +240,8 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
|||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Não há mais dados.", enText: "No more data."),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||
|
@ -257,7 +265,9 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
|||
children: [
|
||||
Center(
|
||||
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>(
|
||||
future: _accessFuture,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting && _accessWrap.isEmpty) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting &&
|
||||
_accessWrap.isEmpty) {
|
||||
return Center(
|
||||
child: SizedBox(
|
||||
width: 50.0,
|
||||
|
@ -310,7 +321,9 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
|||
);
|
||||
} else if (snapshot.hasError) {
|
||||
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(
|
||||
imagePath:
|
||||
'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
|
||||
class ProvisionalHistoryPage extends StatefulWidget {
|
||||
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
|
||||
State<ProvisionalHistoryPage> createState() => ProvisionalHistoryState(opt);
|
||||
}
|
||||
|
@ -40,7 +41,8 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
|||
late Future<void> future;
|
||||
List<dynamic> wrap = [];
|
||||
|
||||
ProvisionalHistoryState(Map<String, String> opt) : selectedTypeSubject = BehaviorSubject.seeded(opt) {
|
||||
ProvisionalHistoryState(Map<String, String> opt)
|
||||
: selectedTypeSubject = BehaviorSubject.seeded(opt) {
|
||||
selectedTypeSubject.listen((value) {});
|
||||
}
|
||||
|
||||
|
@ -50,7 +52,8 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
|||
future = fetchHistoryService();
|
||||
_scrollController = ScrollController()
|
||||
..addListener(() {
|
||||
if (_scrollController.position.atEdge && _scrollController.position.pixels != 0) {
|
||||
if (_scrollController.position.atEdge &&
|
||||
_scrollController.position.pixels != 0) {
|
||||
_loadMore();
|
||||
}
|
||||
});
|
||||
|
@ -112,7 +115,8 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
|||
color: theme.primaryText,
|
||||
fontSize: 16.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(
|
||||
icon: const Icon(Icons.filter_list),
|
||||
onPressed: () async {
|
||||
final Map<String, String>? selectedFilter = await showModalBottomSheet<Map<String, String>>(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => Navigator.of(context).pop(),
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: GestureDetector(
|
||||
onTap: () {},
|
||||
child: FilterWidget(
|
||||
defaultSelections: selectedTypeSubject.value,
|
||||
filterOptions: {
|
||||
'AGP_STATUS': [
|
||||
{
|
||||
'title': FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Ativo',
|
||||
enText: 'Active',
|
||||
),
|
||||
'value': 'AT',
|
||||
final Map<String, String>? selectedFilter =
|
||||
await showModalBottomSheet<Map<String, String>>(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => Navigator.of(context).pop(),
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: GestureDetector(
|
||||
onTap: () {},
|
||||
child: FilterWidget(
|
||||
defaultSelections: selectedTypeSubject.value,
|
||||
filterOptions: {
|
||||
'AGP_STATUS': [
|
||||
{
|
||||
'title': FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
ptText: 'Ativo',
|
||||
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',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'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': ''},
|
||||
filterTitles: {'AGP_STATUS': ''},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
);
|
||||
});
|
||||
|
||||
if (selectedFilter != null) {
|
||||
_updateHistoryAction(selectedFilter);
|
||||
|
@ -210,9 +219,11 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
|||
Future<ApiCallResponse?> fetchHistoryService() async {
|
||||
try {
|
||||
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) {
|
||||
setState(() {
|
||||
|
@ -251,7 +262,9 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
|||
children: [
|
||||
Center(
|
||||
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>(
|
||||
future: future,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting && wrap.isEmpty) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting &&
|
||||
wrap.isEmpty) {
|
||||
return Center(
|
||||
child: SizedBox(
|
||||
width: 50.0,
|
||||
|
@ -304,7 +318,9 @@ class ProvisionalHistoryState extends State<ProvisionalHistoryPage> {
|
|||
);
|
||||
} else if (snapshot.hasError) {
|
||||
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 {
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
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')}";
|
||||
}
|
||||
|
||||
List<Map<String, Color>> _buildStatusHashMap(BuildContext context, dynamic historyItem) {
|
||||
List<Map<String, Color>> _buildStatusHashMap(
|
||||
BuildContext context, dynamic historyItem) {
|
||||
return [
|
||||
{
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
|
|
|
@ -20,7 +20,8 @@ class AccessFilterModel extends FlutterFlowModel<AccessFilter> {
|
|||
// State field(s) for CheckboxGroup widget.
|
||||
FormFieldController<List<String>>? checkboxGroupValueController;
|
||||
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
||||
set checkboxGroupValues(List<String>? v) => checkboxGroupValueController?.value = v;
|
||||
set checkboxGroupValues(List<String>? v) =>
|
||||
checkboxGroupValueController?.value = v;
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
@ -71,8 +72,12 @@ class _AccessFilterState extends State<AccessFilter> {
|
|||
_model.textFieldFocusNode ??= FocusNode();
|
||||
|
||||
selected = {
|
||||
'personType': widget.defaultPersonType == '.*' ? ['E', 'O'] : [widget.defaultPersonType],
|
||||
'accessType': widget.defaultAccessType == '.*' ? ['0', '1'] : [widget.defaultAccessType],
|
||||
'personType': widget.defaultPersonType == '.*'
|
||||
? ['E', 'O']
|
||||
: [widget.defaultPersonType],
|
||||
'accessType': widget.defaultAccessType == '.*'
|
||||
? ['0', '1']
|
||||
: [widget.defaultAccessType],
|
||||
'search': '.*',
|
||||
};
|
||||
}
|
||||
|
@ -81,7 +86,9 @@ class _AccessFilterState extends State<AccessFilter> {
|
|||
Map<String, String> filterResult = {
|
||||
'personType': '',
|
||||
'accessType': '',
|
||||
'search': _model.textController?.text == '' ? '.*' : _model.textController!.text.toLowerCase(),
|
||||
'search': _model.textController?.text == ''
|
||||
? '.*'
|
||||
: _model.textController!.text.toLowerCase(),
|
||||
};
|
||||
|
||||
if (selected['personType']!.isEmpty) {
|
||||
|
@ -104,7 +111,8 @@ class _AccessFilterState extends State<AccessFilter> {
|
|||
context.pop(filterResult);
|
||||
}
|
||||
|
||||
Widget _buildCheckboxListTile(String key, List<Map<String, String>> options, double fontsize) {
|
||||
Widget _buildCheckboxListTile(
|
||||
String key, List<Map<String, String>> options, double fontsize) {
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
return Column(
|
||||
children: [
|
||||
|
@ -121,7 +129,8 @@ class _AccessFilterState extends State<AccessFilter> {
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
),
|
||||
|
@ -141,7 +150,8 @@ class _AccessFilterState extends State<AccessFilter> {
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
),
|
||||
|
@ -168,7 +178,8 @@ class _AccessFilterState extends State<AccessFilter> {
|
|||
width: 5,
|
||||
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,
|
||||
children: [
|
||||
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(
|
||||
FFLocalizations.of(context).getText('yfj9pd6k'), // Filtros
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||
FFLocalizations.of(context)
|
||||
.getText('yfj9pd6k'), // Filtros
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.headlineMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.headlineMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||
fontSize:
|
||||
LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
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(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
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'),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
fontSize:
|
||||
LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
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;
|
||||
FormFieldController<List<String>>? checkboxGroupValueController;
|
||||
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
||||
set checkboxGroupValues(List<String>? v) => checkboxGroupValueController?.value = v;
|
||||
set checkboxGroupValues(List<String>? v) =>
|
||||
checkboxGroupValueController?.value = v;
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
@ -69,11 +70,15 @@ class _FilterWidgetState extends State<FilterWidget> {
|
|||
|
||||
void _applyFilter() {
|
||||
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) {
|
||||
filterResult[key] = selected[key]!.isEmpty || selected[key]!.length < 1 ? '.*' : selected[key]!;
|
||||
filterResult[key] = selected[key]!.isEmpty || selected[key]!.length < 1
|
||||
? '.*'
|
||||
: selected[key]!;
|
||||
});
|
||||
setState(() {
|
||||
// Update the state with the new filter result
|
||||
|
@ -82,7 +87,8 @@ class _FilterWidgetState extends State<FilterWidget> {
|
|||
context.pop(filterResult);
|
||||
}
|
||||
|
||||
Widget _buildCheckboxListTile(String key, List<Map<String, String>> options, double fontsize) {
|
||||
Widget _buildCheckboxListTile(
|
||||
String key, List<Map<String, String>> options, double fontsize) {
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
return Column(
|
||||
children: [
|
||||
|
@ -99,7 +105,8 @@ class _FilterWidgetState extends State<FilterWidget> {
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
),
|
||||
|
@ -119,7 +126,8 @@ class _FilterWidgetState extends State<FilterWidget> {
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
),
|
||||
|
@ -175,19 +183,26 @@ class _FilterWidgetState extends State<FilterWidget> {
|
|||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
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(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Filtros',
|
||||
enText: 'Filters',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.headlineMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.headlineMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||
fontSize:
|
||||
LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
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(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: widget.filterOptions.keys.map((key) {
|
||||
return _buildCheckboxListTile(key, widget.filterOptions[key]!, 14);
|
||||
return _buildCheckboxListTile(
|
||||
key, widget.filterOptions[key]!, 14);
|
||||
}).toList(),
|
||||
),
|
||||
),
|
||||
|
@ -218,12 +234,15 @@ class _FilterWidgetState extends State<FilterWidget> {
|
|||
enText: 'Apply',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
fontSize:
|
||||
LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
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