Files
fcs/lib/domain/vo/delivery_address.dart
2020-10-08 15:54:43 +06:30

46 lines
1016 B
Dart

class DeliveryAddress {
String id;
String fullName;
String addressLine1;
String addressLine2;
String city;
String state;
String country;
String phoneNumber;
DeliveryAddress(
{this.id,
this.fullName,
this.addressLine1,
this.addressLine2,
this.city,
this.state,
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,
'full_name': fullName,
'address_line1': addressLine1,
'address_line2': addressLine2,
'city': city,
'state': state,
'phone_number': phoneNumber,
'country': country,
};
}
}