AddressComponent class
A component of a formatted address, as returned by the Places / Geocoding APIs.
Constructors
-
AddressComponent({required String longName, required String shortName, required List<
String> types}) -
Creates an AddressComponent with
longName,shortName, andtypes.const -
AddressComponent.fromGeocodingJson(Map<
String, dynamic> json) -
Parses the classic Geocoding / Places API v1 format.
factory
-
AddressComponent.fromNewApiJson(Map<
String, dynamic> json) -
Parses the Places API (New) format which uses
longText/shortText.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- longName → String
-
Full text of the address component (e.g. "United States").
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shortName → String
-
Abbreviated text of the address component (e.g. "US").
final
-
types
→ List<
String> -
Place types applicable to this component.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited