add pickup provider
This commit is contained in:
@@ -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}';
|
||||
|
||||
Reference in New Issue
Block a user