ContactAddress class
Represents a postal address
- Annotations
Constructors
- ContactAddress({String street = '', String city = '', String state = '', String postalCode = '', String country = '', String isoCountry = '', String subAdministrativeArea = '', String subLocality = '', AddressLabel label = AddressLabel.home, String customLabel = ''})
-
Creates a ContactAddress with the given parameters
const
-
ContactAddress.fromJson(Map<
String, dynamic> json) -
Creates an address from a JSON map
factory
Properties
- city → String
-
The city
final
- country → String
-
The country
final
- customLabel → String
-
Custom label text when label is AddressLabel.custom
final
- displayLabel → String
-
Returns the display label for this address
no setter
- formattedAddress → String
-
Returns the formatted address as a single string
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isoCountry → String
-
The ISO country code
final
- isValid → bool
-
Returns true if the address has at least one non-empty field
no setter
- label → AddressLabel
-
The address label type
final
- postalCode → String
-
The 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
- state → String
-
The state or province
final
- street → String
-
The street address
final
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited - subAdministrativeArea → String
-
The sub administrative area
final
- subLocality → String
-
The sub locality
final
Methods
-
copyWith(
{String? street, String? city, String? state, String? postalCode, String? country, String? isoCountry, String? subAdministrativeArea, String? subLocality, AddressLabel? label, String? customLabel}) → ContactAddress - Creates a copy of this contact address with the given fields replaced with new values
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this address to a JSON map
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited