change name to delivery address
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user