toMap method
toMap()
returns a Map<String, dynamic>
that contains the street
,
city
, state
, and zip
values of the Address
object
Returns: A map of the address object.
Implementation
Map<String, dynamic> toMap() {
return <String, dynamic>{
'street': street,
'city': city,
'state': state,
'zip': zip,
};
}