change name to delivery address

This commit is contained in:
PhyoThandar
2020-10-08 15:54:43 +06:30
parent 7ae74275cd
commit 7ecb25409b
15 changed files with 689 additions and 403 deletions

View File

@@ -8,7 +8,8 @@ class DeliveryAddress {
String country;
String phoneNumber;
DeliveryAddress(
{this.fullName,
{this.id,
this.fullName,
this.addressLine1,
this.addressLine2,
this.city,
@@ -16,6 +17,19 @@ class DeliveryAddress {
this.country,
this.phoneNumber});
factory DeliveryAddress.fromMap(Map<String, dynamic> map, String docID) {
return DeliveryAddress(
id: docID,
fullName: map['full_name'],
addressLine1: map['address_line1'],
addressLine2: map['address_line2'],
city: map['city'],
state: map['state'],
country: map['country'],
phoneNumber: map['phone_number'],
);
}
Map<String, dynamic> toMap() {
return {
"id": id,
@@ -25,7 +39,7 @@ class DeliveryAddress {
'city': city,
'state': state,
'phone_number': phoneNumber,
'contry': country,
'country': country,
};
}
}