fix: ScheduleCompleteVisitPageModel => ScheduleCompleteVisit
This commit is contained in:
parent
14d2c2f19e
commit
57bfbe33d9
|
@ -41,146 +41,138 @@ class _VisitorNotFoundComponentWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Container(
|
||||
width: 350.0,
|
||||
height: 350.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(25.0),
|
||||
bottomRight: Radius.circular(25.0),
|
||||
topLeft: Radius.circular(25.0),
|
||||
topRight: Radius.circular(25.0),
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.height * 0.5,
|
||||
height: MediaQuery.of(context).size.height * 0.4,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(25.0),
|
||||
bottomRight: Radius.circular(25.0),
|
||||
topLeft: Radius.circular(25.0),
|
||||
topRight: Radius.circular(25.0),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 5.0, 5.0, 0.0),
|
||||
child: FlutterFlowIconButton(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
icon: Icon(
|
||||
Icons.close,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
onPressed: () async {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 5.0, 5.0, 0.0),
|
||||
child: FlutterFlowIconButton(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
icon: Icon(
|
||||
Icons.close,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
size: 24.0,
|
||||
Icon(
|
||||
Icons.notifications_none,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
size: 72.0,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 16.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'1p9mykbj' /* Usuário não encontrado */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).headlineMediumFamily),
|
||||
),
|
||||
onPressed: () async {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(20.0, 4.0, 20.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'kt937sp6' /* O documento inserido não corre... */,
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
Icons.notifications_none,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
size: 72.0,
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 16.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'1p9mykbj' /* Usuário não encontrado */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).headlineMediumFamily),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(10.0, 4.0, 10.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'kt937sp6' /* O documento inserido não corre... */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontStyle: FontStyle.italic,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
Navigator.pop(context);
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
enableDrag: true,
|
||||
useSafeArea: true,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.of(context).size.height * 0.9,
|
||||
child:
|
||||
const RegisiterVistorTemplateComponentWidget(
|
||||
source: 'VisitorNotFoundComponent',
|
||||
)),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'y2x4nfcn' /* Adicionar */,
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontStyle: FontStyle.italic,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
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),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).titleSmallFamily,
|
||||
color: Colors.white,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(25.0),
|
||||
bottomRight: Radius.circular(25.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
Navigator.pop(context);
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
enableDrag: true,
|
||||
useSafeArea: true,
|
||||
isDismissible: true,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.of(context).size.height * 0.9,
|
||||
child: const RegisiterVistorTemplateComponentWidget(
|
||||
source: 'VisitorNotFoundComponent',
|
||||
)),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
text: FFLocalizations.of(context)
|
||||
.getVariableText(enText: 'Add', ptText: 'Adicionar'),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
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),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).titleSmallFamily,
|
||||
color: Colors.white,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(25.0),
|
||||
bottomRight: Radius.circular(25.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
import 'package:hub/backend/api_requests/api_manager.dart';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:hub/backend/api_requests/api_manager.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class ScheduleVisitDetailModel
|
||||
extends FlutterFlowModel<ScheduleVisitDetailWidget> {
|
||||
|
@ -36,6 +38,36 @@ class ScheduleVisitDetailModel
|
|||
// Stores action output result for [Backend Call - API (postScheduleVisit)] action in Icon widget.
|
||||
ApiCallResponse? postScheduleVisit;
|
||||
|
||||
String convertDateFormat(String dateStr) {
|
||||
try {
|
||||
log('Received date string: $dateStr');
|
||||
|
||||
// Formato original
|
||||
DateFormat originalFormat = DateFormat('d/M/y H:mm:ss');
|
||||
// Novo formato
|
||||
DateFormat newFormat = DateFormat('y-M-d H:mm:ss');
|
||||
|
||||
// Validate the input string format
|
||||
if (!RegExp(r'^\d{1,2}/\d{1,2}/\d{4} \d{1,2}:\d{2}:\d{2}$')
|
||||
.hasMatch(dateStr)) {
|
||||
log('Invalid date format: $dateStr');
|
||||
return 'Invalid date format';
|
||||
}
|
||||
|
||||
// Converte a string para DateTime
|
||||
DateTime dateTime = originalFormat.parse(dateStr);
|
||||
|
||||
// Converte DateTime para a nova string formatada
|
||||
String formattedDate = newFormat.format(dateTime);
|
||||
log('Formatted date: $formattedDate');
|
||||
return formattedDate;
|
||||
} catch (e) {
|
||||
// Handle the exception by returning an error message or a default value
|
||||
log('Error parsing date: $e');
|
||||
return 'Invalid date format';
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -485,9 +485,9 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
final selectedMedia =
|
||||
await selectMediaWithSourceBottomSheet(
|
||||
context: context,
|
||||
maxWidth: 300.00,
|
||||
maxHeight: 300.00,
|
||||
imageQuality: 0,
|
||||
// maxWidth: 300.00,
|
||||
// maxHeight: 300.00,
|
||||
imageQuality: 100,
|
||||
allowPhoto: true,
|
||||
includeDimensions: true,
|
||||
);
|
||||
|
@ -567,7 +567,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
width: 0.5,
|
||||
width: 0.2,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
|
@ -915,7 +915,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
|||
options: FFButtonOptions(
|
||||
width: 250.0,
|
||||
height: 36.0,
|
||||
disabledColor: FlutterFlowTheme.of(context).customColor6,
|
||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
80.0, 0.0, 80.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
|
||||
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
|
||||
import 'package:hub/components/templates_components/view_visit_detail/view_visit_detail_widget.dart';
|
||||
|
@ -74,50 +71,47 @@ class _VisitDetailsModalTemplateComponentWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
if (widget.visitStatusStr != null && widget.visitStatusStr != '') {
|
||||
return wrapWithModel(
|
||||
model: _model.viewVisitDetailModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: ViewVisitDetailWidget(
|
||||
visitorImgPath: widget.visitorImgPath,
|
||||
visitStartDate: widget.visitStartDateStr!,
|
||||
visitEndDate: widget.visitEndDateStr!,
|
||||
visitReasonStr: widget.visitReasonStr!,
|
||||
visitLevelStr: widget.visitLevelStr!,
|
||||
visitTempStr: widget.visitTempStr!,
|
||||
visitObsStr: widget.visitObsStr!,
|
||||
visitStatusStr: widget.visitStatusStr!,
|
||||
visitorStrList: widget.visitorStrList!,
|
||||
visitorJsonList: widget.visitorJsonList,
|
||||
visitIdStr: widget.visitIdStr!,
|
||||
visitStatusColor: widget.visitStatusColor!,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return wrapWithModel(
|
||||
model: _model.scheduleVisitDetailModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: ScheduleVisitDetailWidget(
|
||||
visitorStrList: widget.visitorStrList!,
|
||||
visitorImgPath: widget.visitorImgPath,
|
||||
visitStartDate: widget.visitStartDateStr!,
|
||||
visitEndDate: widget.visitEndDateStr!,
|
||||
visitResonStr: widget.visitReasonStr!,
|
||||
visitLevelStr: widget.visitLevelStr!,
|
||||
visitTempStr: widget.visitTempStr!,
|
||||
visitObsStr: widget.visitObsStr!,
|
||||
visitorJsonList: widget.visitorJsonList!,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
return Builder(
|
||||
builder: (context) {
|
||||
if (widget.visitStatusStr != null && widget.visitStatusStr != '') {
|
||||
return wrapWithModel(
|
||||
model: _model.viewVisitDetailModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: ViewVisitDetailWidget(
|
||||
visitorImgPath: widget.visitorImgPath,
|
||||
visitStartDate: widget.visitStartDateStr!,
|
||||
visitEndDate: widget.visitEndDateStr!,
|
||||
visitReasonStr: widget.visitReasonStr!,
|
||||
visitLevelStr: widget.visitLevelStr!,
|
||||
visitTempStr: widget.visitTempStr!,
|
||||
visitObsStr: widget.visitObsStr!,
|
||||
visitStatusStr: widget.visitStatusStr!,
|
||||
visitorStrList: widget.visitorStrList!,
|
||||
visitorJsonList: widget.visitorJsonList,
|
||||
visitIdStr: widget.visitIdStr!,
|
||||
visitStatusColor: widget.visitStatusColor!,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return wrapWithModel(
|
||||
model: _model.scheduleVisitDetailModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: ScheduleVisitDetailWidget(
|
||||
visitorStrList: widget.visitorStrList!,
|
||||
visitorImgPath: widget.visitorImgPath,
|
||||
visitStartDate: widget.visitStartDateStr!,
|
||||
visitEndDate: widget.visitEndDateStr!,
|
||||
visitResonStr: widget.visitReasonStr!,
|
||||
visitLevelStr: widget.visitLevelStr!,
|
||||
visitTempStr: widget.visitTempStr!,
|
||||
visitObsStr: widget.visitObsStr!,
|
||||
visitorJsonList: widget.visitorJsonList!,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
|
@ -109,16 +109,20 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
|||
_model.addToDocs(_model.textController.text);
|
||||
setState(() {});
|
||||
} else {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
enableDrag: true,
|
||||
isDismissible: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
await showAdaptiveDialog(
|
||||
useSafeArea: true,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: const VisitorNotFoundComponentWidget(),
|
||||
return Dialog(
|
||||
child: Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
// width: MediaQuery.of(context).size.height * 0.1,
|
||||
// height:
|
||||
// MediaQuery.of(context).size.height * 0.4,
|
||||
child: const VisitorNotFoundComponentWidget()),
|
||||
),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
|
|
|
@ -58,23 +58,23 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
|||
bool includeBlurHash = false,
|
||||
}) async {
|
||||
createUploadMediaListTile(String label, MediaSource mediaSource) => ListTile(
|
||||
title: Text(
|
||||
label,
|
||||
textAlign: TextAlign.center,
|
||||
style: GoogleFonts.getFont(
|
||||
pickerFontFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 20,
|
||||
),
|
||||
),
|
||||
tileColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
dense: false,
|
||||
onTap: () => Navigator.pop(
|
||||
context,
|
||||
mediaSource,
|
||||
),
|
||||
);
|
||||
title: Text(
|
||||
label,
|
||||
textAlign: TextAlign.center,
|
||||
style: GoogleFonts.getFont(
|
||||
pickerFontFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 20,
|
||||
),
|
||||
),
|
||||
tileColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
dense: false,
|
||||
onTap: () => Navigator.pop(
|
||||
context,
|
||||
mediaSource,
|
||||
),
|
||||
);
|
||||
final mediaSource = await showModalBottomSheet<MediaSource>(
|
||||
context: context,
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
|
@ -91,7 +91,9 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
|||
textAlign: TextAlign.center,
|
||||
style: GoogleFonts.getFont(
|
||||
pickerFontFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText.withOpacity(0.65),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText
|
||||
.withOpacity(0.65),
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 20,
|
||||
),
|
||||
|
@ -360,14 +362,22 @@ void showUploadMessage(
|
|||
child: CircularProgressIndicator(
|
||||
valueColor: Theme.of(context).brightness == Brightness.dark
|
||||
? AlwaysStoppedAnimation<Color>(
|
||||
FlutterFlowTheme.of(context).accent4)
|
||||
FlutterFlowTheme.of(context).info)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
Text(message),
|
||||
Text(message, style: FlutterFlowTheme.of(context).bodyMedium),
|
||||
],
|
||||
),
|
||||
duration: showLoading ? const Duration(days: 1) : const Duration(seconds: 4),
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(15),
|
||||
topRight: Radius.circular(15),
|
||||
),
|
||||
),
|
||||
duration:
|
||||
showLoading ? const Duration(days: 1) : const Duration(seconds: 4),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -83,6 +83,12 @@ class ScheduleCompleteVisitPageModel
|
|||
enText: 'Start date must be before end date.',
|
||||
);
|
||||
}
|
||||
if (startDate.isBefore(DateTime.now())) {
|
||||
return FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Start date must be after current date.',
|
||||
ptText: 'A data de início deve ser posterior à data atual.',
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
return '$e';
|
||||
}
|
||||
|
@ -113,6 +119,12 @@ class ScheduleCompleteVisitPageModel
|
|||
ptText: 'A data de término deve ser posterior à data de início.',
|
||||
);
|
||||
}
|
||||
if (endDate.isBefore(DateTime.now())) {
|
||||
return FFLocalizations.of(context).getVariableText(
|
||||
enText: 'End date must be after current date.',
|
||||
ptText: 'A data de término deve ser posterior à data atual.',
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
return '$e';
|
||||
}
|
||||
|
|
|
@ -269,300 +269,12 @@ Widget scheduleVisit(
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
20.0, 30.0, 0.0, 30.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'u0jocx7e' /* Quais visitantes você deseja c... */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
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),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (_model.visitorJsonList.isNotEmpty)
|
||||
Builder(
|
||||
builder: (context) {
|
||||
final visitorListView =
|
||||
_model.visitorJsonList.map((e) => e).toList();
|
||||
return ListView.separated(
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
0,
|
||||
0,
|
||||
20,
|
||||
20,
|
||||
),
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.vertical,
|
||||
itemCount: visitorListView.length,
|
||||
separatorBuilder: (_, __) =>
|
||||
const SizedBox(height: 5.0),
|
||||
itemBuilder: (context, visitorListViewIndex) {
|
||||
final visitorListViewItem =
|
||||
visitorListView[visitorListViewIndex];
|
||||
return InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
// await showModalBottomSheet(
|
||||
// isScrollControlled: true,
|
||||
// backgroundColor: Colors.transparent,
|
||||
// enableDrag: false,
|
||||
// context: context,
|
||||
// builder: (context) {
|
||||
// return GestureDetector(
|
||||
// onTap: () => _model
|
||||
// .unfocusNode.canRequestFocus
|
||||
// ? FocusScope.of(context)
|
||||
// .requestFocus(_model.unfocusNode)
|
||||
// : FocusScope.of(context).unfocus(),
|
||||
// child: Padding(
|
||||
// padding:
|
||||
// MediaQuery.viewInsetsOf(context),
|
||||
// child:
|
||||
// const VisitorDetailsModalTemplateComponentWidget(
|
||||
// visitorImageURL: '',
|
||||
// visitorEmail: '',
|
||||
// visitorName: '',
|
||||
// visitorPhone: '',
|
||||
// visitorType: '',
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// ).then((value) => safeSetState(() {}));
|
||||
},
|
||||
onLongPress: () async {
|
||||
// _model.removeFromVisitorJsonList(
|
||||
// visitorListViewItem);
|
||||
// setState(() {});
|
||||
},
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 70.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 50.0,
|
||||
height: 50.0,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
fadeOutDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
imageUrl:
|
||||
"https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||
visitorListViewItem,
|
||||
r'''$.VTE_DOCUMENTO''',
|
||||
).toString()}&tipo=E",
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
getJsonField(
|
||||
visitorListViewItem,
|
||||
r'''$.VTE_NOME''',
|
||||
).toString(),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
_model
|
||||
.removeFromVisitorJsonList(
|
||||
visitorListViewItem);
|
||||
setState(() {});
|
||||
},
|
||||
icon: const Icon(Icons.close)),
|
||||
],
|
||||
),
|
||||
),
|
||||
]
|
||||
.divide(const SizedBox(width: 30.0))
|
||||
.addToStart(const SizedBox(width: 30.0)),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
Stack(
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.01, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 20.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
isDismissible: true,
|
||||
backgroundColor: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
enableDrag: true,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => _model
|
||||
.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context)
|
||||
.requestFocus(_model.unfocusNode)
|
||||
: FocusScope.of(context).unfocus(),
|
||||
child: SizedBox(
|
||||
height:
|
||||
MediaQuery.of(context).size.height *
|
||||
0.9,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: Padding(
|
||||
padding:
|
||||
MediaQuery.viewInsetsOf(context),
|
||||
child:
|
||||
VisitorSearchModalTemplateComponentWidget(
|
||||
getVisitors: (visitorsParam) async {
|
||||
_model.visitorJsonList =
|
||||
visitorsParam!
|
||||
.toList()
|
||||
.cast<dynamic>();
|
||||
setState(() {});
|
||||
},
|
||||
getDocs: (docsParam) async {
|
||||
_model.visitorStrList =
|
||||
strListToStr(
|
||||
docsParam!.toList());
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
text: '',
|
||||
icon: Icon(
|
||||
Icons.add,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
size: 30.0,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: MediaQuery.sizeOf(context).width * 0.8,
|
||||
height: 80.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
14.0, 0.0, 0.0, 20.0),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
textStyle: FlutterFlowTheme.of(context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily),
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent4,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 50.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width * 0.8,
|
||||
height: 20.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: AutoSizeText(
|
||||
FFLocalizations.of(context).getText(
|
||||
'r8soavtz' /* Clique para adicionar um visit... */,
|
||||
),
|
||||
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),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(mainAxisSize: MainAxisSize.max, children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
20.0, 24.0, 0.0, 24.0),
|
||||
20.0, 30.0, 0.0, 24.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'98evnbbe' /* Qual o período de validade da ... */,
|
||||
|
@ -1079,6 +791,294 @@ Widget scheduleVisit(
|
|||
]
|
||||
// .divide(const SizedBox(height: 0.0)),
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
20.0, 24.0, 0.0, 30.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'u0jocx7e' /* Quais visitantes você deseja c... */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
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),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (_model.visitorJsonList.isNotEmpty)
|
||||
Builder(
|
||||
builder: (context) {
|
||||
final visitorListView =
|
||||
_model.visitorJsonList.map((e) => e).toList();
|
||||
return ListView.separated(
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
0,
|
||||
0,
|
||||
20,
|
||||
20,
|
||||
),
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.vertical,
|
||||
itemCount: visitorListView.length,
|
||||
separatorBuilder: (_, __) =>
|
||||
const SizedBox(height: 5.0),
|
||||
itemBuilder: (context, visitorListViewIndex) {
|
||||
final visitorListViewItem =
|
||||
visitorListView[visitorListViewIndex];
|
||||
return InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
// await showModalBottomSheet(
|
||||
// isScrollControlled: true,
|
||||
// backgroundColor: Colors.transparent,
|
||||
// enableDrag: false,
|
||||
// context: context,
|
||||
// builder: (context) {
|
||||
// return GestureDetector(
|
||||
// onTap: () => _model
|
||||
// .unfocusNode.canRequestFocus
|
||||
// ? FocusScope.of(context)
|
||||
// .requestFocus(_model.unfocusNode)
|
||||
// : FocusScope.of(context).unfocus(),
|
||||
// child: Padding(
|
||||
// padding:
|
||||
// MediaQuery.viewInsetsOf(context),
|
||||
// child:
|
||||
// const VisitorDetailsModalTemplateComponentWidget(
|
||||
// visitorImageURL: '',
|
||||
// visitorEmail: '',
|
||||
// visitorName: '',
|
||||
// visitorPhone: '',
|
||||
// visitorType: '',
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// ).then((value) => safeSetState(() {}));
|
||||
},
|
||||
onLongPress: () async {
|
||||
// _model.removeFromVisitorJsonList(
|
||||
// visitorListViewItem);
|
||||
// setState(() {});
|
||||
},
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 70.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 50.0,
|
||||
height: 50.0,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
fadeOutDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
imageUrl:
|
||||
"https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||
visitorListViewItem,
|
||||
r'''$.VTE_DOCUMENTO''',
|
||||
).toString()}&tipo=E",
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
getJsonField(
|
||||
visitorListViewItem,
|
||||
r'''$.VTE_NOME''',
|
||||
).toString(),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
_model
|
||||
.removeFromVisitorJsonList(
|
||||
visitorListViewItem);
|
||||
setState(() {});
|
||||
},
|
||||
icon: const Icon(Icons.close)),
|
||||
],
|
||||
),
|
||||
),
|
||||
]
|
||||
.divide(const SizedBox(width: 30.0))
|
||||
.addToStart(const SizedBox(width: 30.0)),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
Stack(
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.01, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 20.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
isDismissible: true,
|
||||
backgroundColor: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
enableDrag: true,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => _model
|
||||
.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context)
|
||||
.requestFocus(_model.unfocusNode)
|
||||
: FocusScope.of(context).unfocus(),
|
||||
child: SizedBox(
|
||||
height:
|
||||
MediaQuery.of(context).size.height *
|
||||
0.7,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: Padding(
|
||||
padding:
|
||||
MediaQuery.viewInsetsOf(context),
|
||||
child:
|
||||
VisitorSearchModalTemplateComponentWidget(
|
||||
getVisitors: (visitorsParam) async {
|
||||
_model.visitorJsonList =
|
||||
visitorsParam!
|
||||
.toList()
|
||||
.cast<dynamic>();
|
||||
setState(() {});
|
||||
},
|
||||
getDocs: (docsParam) async {
|
||||
_model.visitorStrList =
|
||||
strListToStr(
|
||||
docsParam!.toList());
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
text: '',
|
||||
icon: Icon(
|
||||
Icons.add,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
size: 30.0,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: MediaQuery.sizeOf(context).width * 0.8,
|
||||
height: 80.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
14.0, 0.0, 0.0, 20.0),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
textStyle: FlutterFlowTheme.of(context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily),
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent4,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 50.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width * 0.8,
|
||||
height: 20.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: AutoSizeText(
|
||||
FFLocalizations.of(context).getText(
|
||||
'r8soavtz' /* Clique para adicionar um visit... */,
|
||||
),
|
||||
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),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
|
@ -1146,6 +1146,8 @@ Widget scheduleVisit(
|
|||
dropDownGetDadosResponse.jsonBody,
|
||||
);
|
||||
return FlutterFlowDropDown<String>(
|
||||
fillColor: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
controller:
|
||||
_model.dropDownValueController1 ??=
|
||||
FormFieldController<String>(
|
||||
|
@ -1326,6 +1328,8 @@ Widget scheduleVisit(
|
|||
const EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 16.0, 0.0),
|
||||
hidesUnderline: true,
|
||||
fillColor: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
isOverButton: true,
|
||||
isSearchable: false,
|
||||
isMultiSelect: false,
|
||||
|
@ -1602,13 +1606,13 @@ Widget scheduleVisit(
|
|||
),
|
||||
),
|
||||
FFButtonWidget(
|
||||
text: 'Schedule',
|
||||
text: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Schedule',
|
||||
ptText: 'Agendar',
|
||||
),
|
||||
onPressed: _model.isValid()
|
||||
? () async {
|
||||
await showDialog(
|
||||
// isScrollControlled: true,
|
||||
// backgroundColor: Colors.transparent,
|
||||
// enableDrag: false,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
|
@ -1619,8 +1623,8 @@ Widget scheduleVisit(
|
|||
child: Dialog(
|
||||
alignment: Alignment.topCenter,
|
||||
child: SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: MediaQuery.of(context).size.height * 0.5,
|
||||
// width: MediaQuery.of(context).size.width,
|
||||
// height: MediaQuery.of(context).size.height * 0.7,
|
||||
child: VisitDetailsModalTemplateComponentWidget(
|
||||
visitStartDateStr: _model.textController1.text,
|
||||
visitEndDateStr: _model.textController2.text,
|
||||
|
@ -1645,6 +1649,12 @@ Widget scheduleVisit(
|
|||
height: MediaQuery.of(context).size.height * 0.05,
|
||||
width: MediaQuery.of(context).size.height * 0.2,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(15.0),
|
||||
bottomRight: Radius.circular(15.0),
|
||||
topLeft: Radius.circular(15.0),
|
||||
topRight: Radius.circular(15.0),
|
||||
),
|
||||
disabledColor: FlutterFlowTheme.of(context).customColor5),
|
||||
showLoadingIndicator: true,
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue