Address.fromMap constructor

Address.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory Address.fromMap(Map<String, dynamic> map) {
  return Address(
    map['street'] ?? '',
    map['city'] ?? '',
    map['country'] != null
        ? Country.fromMap(map['country'])
        : Country.emptyCountry,
    code: map['code'] ?? '',
    latitude: map['latitude'] ?? 0.0,
    longitude: map['longitude'] ?? 0.0,
  );
}