fix errors
This commit is contained in:
@@ -490,7 +490,7 @@ class _CartonEditorState extends State<CartonEditor> {
|
||||
showMsgDialog(context, "Error", "Invalid delivery address");
|
||||
return;
|
||||
}
|
||||
if (isSmallBag && _mixCarton == null) {
|
||||
if (isSmallBag && _mixCarton == null && _isNew) {
|
||||
showMsgDialog(context, "Error", "Invalid mix carton");
|
||||
return;
|
||||
}
|
||||
@@ -507,7 +507,9 @@ class _CartonEditorState extends State<CartonEditor> {
|
||||
carton.width = w;
|
||||
carton.height = h;
|
||||
carton.deliveryAddress = _deliveryAddress;
|
||||
carton.cartons = _carton.cartons.where((c) => c.isChecked).toList();
|
||||
carton.cartons = _carton.cartons == null
|
||||
? []
|
||||
: _carton.cartons.where((c) => c.isChecked).toList();
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user