StoreShippingAddress class

Annotations
  • @JsonSerializable.new(includeIfNull: false)

Constructors

StoreShippingAddress({String? firstName, String? lastName, String? company, String? address1, String? address2, String? city, String? state, String? postcode, String? country})
StoreShippingAddress.empty()
factory
StoreShippingAddress.fromBillingAddress(StoreBillingAddress billing)
Create shipping address from billing address Copies all relevant fields from billing address to shipping address Ensures all fields are set (uses empty string if null) so they're included in JSON
factory
StoreShippingAddress.fromCustomer(WooCustomer customer)
factory
StoreShippingAddress.fromJson(Map<String, dynamic> json)
factory

Properties

address1 String?
Address line 1
getter/setter pair
address2 String?
Address line 2
getter/setter pair
city String?
City
getter/setter pair
company String?
Company name
getter/setter pair
country String?
Country code (ISO)
getter/setter pair
firstName String?
First name
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
lastName String?
Last name
getter/setter pair
postcode String?
Postal code
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state String?
State/Province code or name
getter/setter pair

Methods

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.
inherited

Operators

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

Static Methods

fake() StoreShippingAddress
isEmptyOrNull(StoreShippingAddress? address) bool
Check if shipping address is empty or null Returns true if address is null or all critical fields are empty/null Checks: firstName, lastName, address1, and city (minimum required fields)