update cartion editor

This commit is contained in:
tzw
2024-02-09 17:40:51 +06:30
parent edf89935a0
commit 95b07c22bb
6 changed files with 55 additions and 33 deletions

View File

@@ -36,10 +36,11 @@ class Carton {
String? mixCartonNumber;
String? cartonSizeID;
String? cartonSizeName;
String? deliveryType;
String? cartonSizeType;
String? cartonStandardSize;
double cartonWeight;
String? billTo;
String? billTo;
bool isSelected;
int rate;
@@ -51,7 +52,6 @@ class Carton {
String? remark;
DateTime? arrivedDate;
String? cartonNumber;
String? deliveryCarton;
List<String> packageIDs;
List<Package> packages;
@@ -163,12 +163,11 @@ class Carton {
this.cartonSizeID,
this.cartonSizeName,
this.cartonSizeType,
this.cartonStandardSize,
this.deliveryCarton,
this.deliveryType,
this.mixBoxType,
this.mixCartons = const [],
this.mixCartonIDs = const [],
this.cartonWeight =0,
this.cartonWeight = 0,
this.photoUrls = const [],
this.isSelected = false});
@@ -209,7 +208,7 @@ class Carton {
List<Map<String, dynamic>>.from(map['mix_cartons'] ?? []);
var _mixCartons =
mixCartonsMaps.map((e) => Carton.fromMap(e, e["id"])).toList();
List<String> _photoUrls =
List<String> _photoUrls =
map['photo_urls'] == null ? [] : List.from(map['photo_urls']);
return Carton(
@@ -243,7 +242,7 @@ class Carton {
senderName: map['sender_name'],
mixCartonIDs: List<String>.from(map['mix_carton_ids'] ?? []),
cartonWeight: (map['carton_weight'] ?? 0).toDouble(),
photoUrls: _photoUrls,
photoUrls: _photoUrls,
);
}