|
|
|
@ -179,6 +179,10 @@ class _UpdateTechnicalInspectionLinesViewState extends State<UpdateTechnicalInsp
|
|
|
|
title: 'Power Supply Type'.addTranslation,
|
|
|
|
title: 'Power Supply Type'.addTranslation,
|
|
|
|
titleTextColor: AppColor.neutral120,
|
|
|
|
titleTextColor: AppColor.neutral120,
|
|
|
|
showShadow: false,
|
|
|
|
showShadow: false,
|
|
|
|
|
|
|
|
validator: (value) {
|
|
|
|
|
|
|
|
if (value == null) return 'Please select power supply type';
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
},
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
backgroundColor: AppColor.fieldBgColor(context),
|
|
|
|
showAsBottomSheet: true,
|
|
|
|
showAsBottomSheet: true,
|
|
|
|
initialValue: model.powerSupplyType,
|
|
|
|
initialValue: model.powerSupplyType,
|
|
|
|
@ -198,6 +202,10 @@ class _UpdateTechnicalInspectionLinesViewState extends State<UpdateTechnicalInsp
|
|
|
|
labelStyle: AppTextStyles.textFieldLabelStyle,
|
|
|
|
labelStyle: AppTextStyles.textFieldLabelStyle,
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
showShadow: false,
|
|
|
|
showShadow: false,
|
|
|
|
|
|
|
|
validator: (value) {
|
|
|
|
|
|
|
|
if ((value ?? "").isEmpty) return "Mandatory";
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
},
|
|
|
|
onSaved: (value) {
|
|
|
|
onSaved: (value) {
|
|
|
|
model.powerReading = int.tryParse(value);
|
|
|
|
model.powerReading = int.tryParse(value);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -212,6 +220,10 @@ class _UpdateTechnicalInspectionLinesViewState extends State<UpdateTechnicalInsp
|
|
|
|
labelStyle: AppTextStyles.textFieldLabelStyle,
|
|
|
|
labelStyle: AppTextStyles.textFieldLabelStyle,
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
showShadow: false,
|
|
|
|
showShadow: false,
|
|
|
|
|
|
|
|
validator: (value) {
|
|
|
|
|
|
|
|
if ((value ?? "").isEmpty) return "Mandatory";
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
},
|
|
|
|
onSaved: (value) {
|
|
|
|
onSaved: (value) {
|
|
|
|
model.maxCurrent = int.tryParse(value);
|
|
|
|
model.maxCurrent = int.tryParse(value);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -224,6 +236,10 @@ class _UpdateTechnicalInspectionLinesViewState extends State<UpdateTechnicalInsp
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
initialValue: model.voltage != null ? model.voltage.toString() : '',
|
|
|
|
initialValue: model.voltage != null ? model.voltage.toString() : '',
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
|
|
|
validator: (value) {
|
|
|
|
|
|
|
|
if ((value ?? "").isEmpty) return "Mandatory";
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
},
|
|
|
|
onSaved: (value) {
|
|
|
|
onSaved: (value) {
|
|
|
|
model.voltage = int.tryParse(value);
|
|
|
|
model.voltage = int.tryParse(value);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -238,6 +254,10 @@ class _UpdateTechnicalInspectionLinesViewState extends State<UpdateTechnicalInsp
|
|
|
|
initialValue: model.frequency != null ? model.frequency.toString() : '',
|
|
|
|
initialValue: model.frequency != null ? model.frequency.toString() : '',
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
textInputType: TextInputType.number,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
|
|
|
validator: (value) {
|
|
|
|
|
|
|
|
if ((value ?? "").isEmpty) return "Mandatory";
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
},
|
|
|
|
onSaved: (value) {
|
|
|
|
onSaved: (value) {
|
|
|
|
model.frequency = int.tryParse(value);
|
|
|
|
model.frequency = int.tryParse(value);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -250,6 +270,7 @@ class _UpdateTechnicalInspectionLinesViewState extends State<UpdateTechnicalInsp
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void _saveTap() async {
|
|
|
|
void _saveTap() async {
|
|
|
|
|
|
|
|
if (!_formKey.currentState!.validate()) return;
|
|
|
|
_formKey.currentState!.save();
|
|
|
|
_formKey.currentState!.save();
|
|
|
|
model.tableItemId = widget.deliveryTableModel.id;
|
|
|
|
model.tableItemId = widget.deliveryTableModel.id;
|
|
|
|
model.lineId = widget.deliveryLineModel?.id;
|
|
|
|
model.lineId = widget.deliveryLineModel?.id;
|
|
|
|
|