format
This commit is contained in:
parent
56cb5427a2
commit
61e3effa59
|
@ -73,7 +73,7 @@ class VehicleModel extends FlutterFlowModel<VehiclePage>
|
|||
await StorageHelper().get(LocalsStorageKey.vehicleAmountRegister.key);
|
||||
}
|
||||
|
||||
bool isFormValid(BuildContext context, GlobalKey<FormState> formKey) {
|
||||
bool isFormValid(BuildContext context, GlobalKey<FormState> formKey) {
|
||||
if (formKey.currentState == null) return false;
|
||||
return formKey.currentState!.validate();
|
||||
}
|
||||
|
@ -163,7 +163,6 @@ mixin class _BaseVehiclePage {
|
|||
log('vehicleId: ${item['vehicleId']}');
|
||||
vehicleId = item['vehicleId'];
|
||||
|
||||
|
||||
textFieldControllerLicensePlate = TextEditingController(
|
||||
text: item != null ? item['licensePlate'] ?? '' : '');
|
||||
textFieldControllerColor =
|
||||
|
@ -320,10 +319,8 @@ mixin _VehicleHistoryScreenModel on _BaseVehiclePage {
|
|||
context.pop();
|
||||
isEditing = true;
|
||||
|
||||
|
||||
await switchTab(1);
|
||||
await setEditForm(item);
|
||||
|
||||
}
|
||||
|
||||
final cancelText = FFLocalizations.of(context)
|
||||
|
|
|
@ -72,7 +72,8 @@ class _VehicleRegisterScreenState extends State<VehicleRegisterScreen> {
|
|||
child: SubmitButtonUtil(
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Cadastrar', enText: 'Register'),
|
||||
onPressed: widget.model.isFormValid(context, widget.model.registerFormKey)
|
||||
onPressed: widget.model
|
||||
.isFormValid(context, widget.model.registerFormKey)
|
||||
? widget.model.registerVehicle
|
||||
: null,
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue