feat: Improve image upload functionality
The code changes include fixes for image upload, renaming of a class, and improvements to message well, visitor register, and preferences pages. These changes aim to enhance the image upload functionality and ensure a smoother user experience.
This commit is contained in:
parent
08e072e183
commit
561a128943
|
@ -364,100 +364,79 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 10.0),
|
24.0, 0.0, 24.0, 10.0),
|
||||||
child: Container(
|
child: Column(
|
||||||
width: MediaQuery.sizeOf(context).width * 0.95,
|
children: [
|
||||||
decoration: const BoxDecoration(),
|
FlutterFlowDropDown<String>(
|
||||||
child: Column(
|
controller: _model.dropDownValueController ??=
|
||||||
children: [
|
FormFieldController<String>(null),
|
||||||
Row(
|
options: [
|
||||||
mainAxisSize: MainAxisSize.min,
|
FFLocalizations.of(context).getText(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
'n8vddmcq' /* Visitante */,
|
||||||
children: [
|
|
||||||
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 5.0),
|
|
||||||
child: FlutterFlowDropDown<String>(
|
|
||||||
controller: _model.dropDownValueController ??=
|
|
||||||
FormFieldController<String>(null),
|
|
||||||
options: [
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'n8vddmcq' /* Visitante */,
|
|
||||||
),
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'9luaa09e' /* Prestador de Serviço */,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
onChanged: (val) =>
|
|
||||||
setState(() => _model.dropDownValue = val),
|
|
||||||
width: 200.0,
|
|
||||||
height: 44.0,
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
hintText: FFLocalizations.of(context).getText(
|
|
||||||
'pmezihb4' /* Selecione... */,
|
|
||||||
),
|
|
||||||
icon: Icon(
|
|
||||||
Icons.keyboard_arrow_down_rounded,
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context).primaryText,
|
|
||||||
size: 24.0,
|
|
||||||
),
|
|
||||||
elevation: 2.0,
|
|
||||||
borderColor:
|
|
||||||
FlutterFlowTheme.of(context).customColor6,
|
|
||||||
borderWidth: 0.5,
|
|
||||||
borderRadius: 8.0,
|
|
||||||
margin: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
16.0, 0.0, 16.0, 0.0),
|
|
||||||
hidesUnderline: true,
|
|
||||||
isOverButton: true,
|
|
||||||
isSearchable: false,
|
|
||||||
isMultiSelect: false,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
.divide(const SizedBox(width: 19.0))
|
|
||||||
.addToStart(const SizedBox(width: 30.0)),
|
|
||||||
),
|
|
||||||
if (_model.dropDownValue == null ||
|
|
||||||
_model.dropDownValue == '')
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(0.4, 0),
|
|
||||||
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),
|
|
||||||
)),
|
|
||||||
),
|
),
|
||||||
],
|
FFLocalizations.of(context).getText(
|
||||||
),
|
'9luaa09e' /* Prestador de Serviço */,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
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,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
hintText: FFLocalizations.of(context).getText(
|
||||||
|
'pmezihb4' /* Selecione... */,
|
||||||
|
),
|
||||||
|
icon: Icon(
|
||||||
|
Icons.keyboard_arrow_down_rounded,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
size: 24.0,
|
||||||
|
),
|
||||||
|
elevation: 2.0,
|
||||||
|
borderColor: FlutterFlowTheme.of(context).customColor6,
|
||||||
|
borderWidth: 0.5,
|
||||||
|
borderRadius: 8.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 == '')
|
||||||
|
Align(
|
||||||
|
alignment: const AlignmentDirectional(0.4, 0),
|
||||||
|
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),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Builder(
|
Builder(
|
||||||
|
@ -502,11 +481,11 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
allowPhoto: true,
|
allowPhoto: true,
|
||||||
includeDimensions: true,
|
includeDimensions: true,
|
||||||
);
|
);
|
||||||
if (selectedMedia != null){
|
if (selectedMedia != null) {
|
||||||
// &&
|
// &&
|
||||||
// selectedMedia.every((m) =>
|
// selectedMedia.every((m) =>
|
||||||
// validateFileFormat(
|
// validateFileFormat(
|
||||||
// m.storagePath, context))) {
|
// m.storagePath, context))) {
|
||||||
setState(() => _model.isDataUploading = true);
|
setState(() => _model.isDataUploading = true);
|
||||||
var selectedUploadedFiles =
|
var selectedUploadedFiles =
|
||||||
<FFUploadedFile>[];
|
<FFUploadedFile>[];
|
||||||
|
|
Loading…
Reference in New Issue