fix modal de meus veiculos

This commit is contained in:
J. A. Messias 2024-11-05 11:13:25 -03:00
parent abf2827afe
commit a29cd60c26
2 changed files with 5 additions and 8 deletions

View File

@ -12,7 +12,7 @@ class DetailsComponentWidget extends StatefulWidget {
Key? key, Key? key,
required this.labelsHashMap, required this.labelsHashMap,
required this.statusHashMap, required this.statusHashMap,
required this.imagePath, this.imagePath,
this.onTapCardItemAction, this.onTapCardItemAction,
required this.buttons, required this.buttons,
}); });
@ -74,7 +74,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
SizedBox(height: MediaQuery.of(context).size.height * 0.02), SizedBox(height: MediaQuery.of(context).size.height * 0.02),
Container( if(widget.imagePath != null) Container(
width: MediaQuery.of(context).size.width * 0.3, width: MediaQuery.of(context).size.width * 0.3,
height: MediaQuery.of(context).size.width * 0.3, height: MediaQuery.of(context).size.width * 0.3,
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
@ -89,6 +89,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
useOldImageOnUrlChange: true, useOldImageOnUrlChange: true,
), ),
), ),
SizedBox(height: MediaQuery.of(context).size.height * 0.03), SizedBox(height: MediaQuery.of(context).size.height * 0.03),
Row( Row(
children: statusLinkedHashMap.expand((linkedHashMap) { children: statusLinkedHashMap.expand((linkedHashMap) {
@ -99,8 +100,6 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
horizontal: MediaQuery.of(context).size.width * 0.05, horizontal: MediaQuery.of(context).size.width * 0.05,
), ),
child: TextFormField( child: TextFormField(
// controller: _model.textControllerStatus,
// focusNode: _model.textFieldFocusNodeStatus,
autofocus: false, autofocus: false,
canRequestFocus: false, canRequestFocus: false,
readOnly: true, readOnly: true,
@ -115,7 +114,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
), ),
filled: true, filled: true,
fillColor: item.value, fillColor: item.value,
labelText: item.key, labelText: item.key,
labelStyle: FlutterFlowTheme.of(context).labelMedium.override( labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily, fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -149,7 +148,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
FlutterFlowTheme.of(context).bodyMediumFamily, FlutterFlowTheme.of(context).bodyMediumFamily,
), ),
), ),
textAlign: TextAlign.start, textAlign: TextAlign.center,
maxLines: null, maxLines: null,
keyboardType: TextInputType.name, keyboardType: TextInputType.name,
validator: _model.textController1Validator.asValidator(context), validator: _model.textController1Validator.asValidator(context),

View File

@ -51,9 +51,7 @@ class VehicleModel extends FlutterFlowModel<VehicleOnTheProperty> {
'${FFLocalizations.of(context).getVariableText(ptText: "Tag", enText: "Tag")}:': '${FFLocalizations.of(context).getVariableText(ptText: "Tag", enText: "Tag")}:':
item['tag'].toString().toUpperCase(), item['tag'].toString().toUpperCase(),
}), }),
imagePath: 'https://freaccess.com.br/freaccess/Images/Clients/${StorageUtil().cliUUID}.png',
statusHashMap: [ statusHashMap: [
if (item['model'] != null) Map<String, Color>.from({item['model']: FlutterFlowTheme.of(context).primary}),
], ],
); );
} }