Address class

Represents a physical address.

Annotations
  • @JsonSerializable()

Constructors

Address({String? addressLine1, String? addressLine2, String? addressLine3, String? administrativeDistrictLevel1, String? administrativeDistrictLevel2, String? administrativeDistrictLevel3, Country? country, String? firstName, String? lastName, String? locality, String? organization, String? postalCode, String? sublocality, String? sublocality2, String? sublocality3})
@macro Represents a physical address.
const
Address.fromJson(Map<String, dynamic> json)
Converts a Map to an Address
factory

Properties

addressLine1 String?
The first line of the address. Fields that start with address_line provide the address's most specific details, like street number, street name, and building name. They do not provide less specific details like city, state/province, or country (these details are provided in other fields).
final
addressLine2 String?
The second line of the address, if any.
final
addressLine3 String?
The third line of the address, if any.
final
administrativeDistrictLevel1 String?
A civil entity within the address's country. In the US, this is the state.
final
administrativeDistrictLevel2 String?
A civil entity within the address's administrative_district_level_1. In the US, this is the county.
final
administrativeDistrictLevel3 String?
A civil entity within the address's administrative_district_level_2, if any.
final
country Country?
The address's country, in ISO 3166-1-alpha-2 format.
final
firstName String?
Optional first name when it's representing recipient.
final
hashCode int
The hash code for this object.
no setterinherited
lastName String?
Optional last name when it's representing recipient.
final
locality String?
The city or town of the address.
final
organization String?
Optional organization name when it's representing recipient.
final
postalCode String?
The address's postal code.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
sublocality String?
A civil region within the address's locality, if any.
final
sublocality2 String?
A civil region within the address's sublocality, if any.
final
sublocality3 String?
A civil region within the address's sublocality_2, if any.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts a Address to a Map
toString() String
A string representation of this object.
inherited

Operators

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