toMap method

Map<String, dynamic> toMap()

It converts the object into a map.

Returns: A map of the address object.

Implementation

Map<String, dynamic> toMap() {
  return <String, dynamic>{
    'address1': address1,
    'address2': address2,
    'city': city,
    'postalCode': postalCode,
    'coordinates': coordinates?.toMap(),
    'state': state,
  };
}