add package

This commit is contained in:
2020-06-02 16:19:10 +06:30
parent 4864977588
commit d41d48b405
5 changed files with 191 additions and 91 deletions

View File

@@ -12,13 +12,14 @@ class Package {
int rate;
int weight;
int amount;
String packageType;
String pickUpID;
List<String> photos;
String remark;
DateTime arrivedDate;
int get amount => rate != null && weight != null ? rate * weight : 0;
String get packageNumber =>
shipmentNumber + "-" + receiverNumber + " #" + boxNumber;
double get price => rate.toDouble() * weight;
@@ -35,7 +36,6 @@ class Package {
this.boxNumber,
this.rate,
this.weight,
this.amount,
this.packageType,
this.pickUpID,
this.remark,