add package return

This commit is contained in:
Sai Naw Wun
2020-10-20 08:02:29 +06:30
parent 4d0e5b6833
commit 4884311d47
14 changed files with 66 additions and 18 deletions

View File

@@ -9,7 +9,6 @@ class Package {
String fcsID;
String userName;
String phoneNumber;
String currentStatus;
DateTime currentStatusDate;
List<String> photoUrls;
List<ShipmentStatus> shipmentHistory;
@@ -68,7 +67,6 @@ class Package {
this.cargoDesc,
this.market,
this.shipmentHistory,
this.currentStatus,
this.currentStatusDate,
this.photoUrls,
this.desc,
@@ -96,7 +94,7 @@ class Package {
phoneNumber: map['phone_number'],
remark: map['remark'],
desc: map['desc'],
currentStatus: map['status'],
status: map['status'],
deliveryAddress: _da,
currentStatusDate:
_currentStatusDate != null ? _currentStatusDate.toDate() : null,
@@ -121,12 +119,12 @@ class Package {
market: json['market'],
userName: json['user_name'],
phoneNumber: json['phone_number'],
currentStatus: json['status'],
status: json['status'],
currentStatusDate: DateTime.parse(json['status_date']));
}
@override
String toString() {
return 'Package{id: $id, currentStatus: $currentStatus, market:$market, trackingID: $trackingID,}';
return 'Package{id: $id, status: $status, market:$market, trackingID: $trackingID,}';
}
}