AddressInfo class Landmarks

Contains structured address information for a Landmark.

An AddressInfo stores a set of named address components (for example street, city, postal code and country). Use getField to read a specific component, setField to modify it, and format to produce a human-readable representation. Instances are lightweight wrappers around an underlying platform object and are created via the public constructor or returned from other APIs such as Landmark.address.

Changes made to an AddressInfo do not automatically propagate to the associated Landmark. To apply changes, set the modified AddressInfo back on the landmark via Landmark.address.

See also:

  • Landmark.address — Obtain the address information for a landmark.
  • AddressField — Enumation of address fields that can be read or modified.

Constructors

AddressInfo()
Creates a new empty AddressInfo instance.

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

format({List<AddressField>? excludeFields, List<AddressField>? includeFields}) String
Returns the address formatted as a single, human-readable line.
getField(AddressField field) String?
Get address field name.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setField(String str, AddressField field) → void
Set address field name.
toString() String
A string representation of this object.
inherited

Operators

operator ==(covariant AddressInfo other) bool
The equality operator.
override