add pickup provider

This commit is contained in:
2021-10-09 09:27:51 +06:30
parent 2a3277035e
commit 46da87dc0e
7 changed files with 102 additions and 5 deletions

View File

@@ -20,6 +20,10 @@ class Pickup {
String? shipperPhoneNumber;
String? status;
// for complete
String? completeRemark;
List<String> photoUrls;
List<Package> packages;
Pickup(
@@ -37,7 +41,8 @@ class Pickup {
this.shipperName,
this.shipperPhoneNumber,
this.status,
this.packages = const []});
this.packages = const [],
this.photoUrls = const []});
@override
bool operator ==(Object other) => other is Pickup && other.id == id;
@@ -83,6 +88,14 @@ class Pickup {
};
}
Map<String, dynamic> toMapForComplete() {
return {
"id": id,
"complete_remark": completeRemark,
'photo_urls': photoUrls ?? [],
};
}
@override
String toString() {
return 'Pickup{id: $id}';