update carton form ,info and filter
This commit is contained in:
@@ -84,12 +84,12 @@ class _CargoEditorState extends State<CargoEditor> {
|
||||
controller: _displayIndexController,
|
||||
textInputType: TextInputType.number,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return "Please insert display index";
|
||||
}
|
||||
return null;
|
||||
},
|
||||
// validator: (value) {
|
||||
// if (value == null || value.isEmpty) {
|
||||
// return "Please insert display index";
|
||||
// }
|
||||
// return null;
|
||||
// },
|
||||
);
|
||||
|
||||
final defaultBox = Padding(
|
||||
@@ -189,7 +189,9 @@ class _CargoEditorState extends State<CargoEditor> {
|
||||
CargoType _cargo = CargoType(
|
||||
name: _descController.text,
|
||||
rate: double.parse(_rateController.text),
|
||||
displayIndex: int.parse(_displayIndexController.text),
|
||||
displayIndex: _displayIndexController.text == ''
|
||||
? 0
|
||||
: int.parse(_displayIndexController.text),
|
||||
isDefault: _isDefault);
|
||||
if (_isNew) {
|
||||
await shipmentRateModel.addCargoType(_cargo);
|
||||
|
||||
Reference in New Issue
Block a user