Address class

Postal address property.

formatted is the full formatted address string. All other fields except label are structured components.

When reading: Use formatted for display (always available).

When creating/updating: Use component fields when possible. Use formatted only when components aren't available.

Platform differences:

  • Android stores both formatted and components independently.
  • iOS only stores components; formatted is generated from components when reading.
Field Android iOS
formatted
street
city
state
postalCode
country
poBox
neighborhood
isoCountryCode
subAdministrativeArea
subLocality

Constructors

Address({String? formatted, String? street, String? city, String? state, String? postalCode, String? country, String? isoCountryCode, String? subAdministrativeArea, String? subLocality, String? poBox, String? neighborhood, Label<AddressLabel>? label, PropertyMetadata? metadata})
const

Properties

city String?
City.
final
country String?
Country name.
final
formatted String?
Formatted address string.
final
hashCode int
The hash code for this object.
no setteroverride
isoCountryCode String?
ISO 3166-1 alpha-2 country code (iOS only, e.g., "US", "GB", "FR").
final
label Label<AddressLabel>
Address label type.
final
metadata PropertyMetadata?
Property identity metadata (used internally for updates).
final
neighborhood String?
Neighborhood (Android only, e.g., "Greenwich Village").
final
poBox String?
P.O. Box (Android only, e.g., "PO Box 123").
final
postalCode String?
Postal or ZIP code.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state String?
State or province.
final
street String?
Street address.
final
subAdministrativeArea String?
Sub-administrative area (iOS only, e.g., county).
final
subLocality String?
Sub-locality (iOS only, e.g., neighborhood or district).
final

Methods

copyWith({String? formatted, String? street, String? city, String? state, String? postalCode, String? country, String? isoCountryCode, String? subAdministrativeArea, String? subLocality, String? poBox, String? neighborhood, Label<AddressLabel>? label, PropertyMetadata? metadata}) Address
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromJson(Map json) Address