copyWith method

Address copyWith({
  1. String? city,
  2. String? company,
  3. Country? country,
  4. DateTime? createdAt,
  5. Map<String, dynamic>? customFields,
  6. bool? defaultBillingAddress,
  7. bool? defaultShippingAddress,
  8. String? fullName,
  9. String? id,
  10. String? phoneNumber,
  11. String? postalCode,
  12. String? province,
  13. String? streetLine1,
  14. String? streetLine2,
  15. DateTime? updatedAt,
})

Implementation

Address copyWith({
  String? city,
  String? company,
  Country? country,
  DateTime? createdAt,
  Map<String, dynamic>? customFields,
  bool? defaultBillingAddress,
  bool? defaultShippingAddress,
  String? fullName,
  String? id,
  String? phoneNumber,
  String? postalCode,
  String? province,
  String? streetLine1,
  String? streetLine2,
  DateTime? updatedAt,
}) {
  return Address(
    city: city ?? this.city,
    company: company ?? this.company,
    country: country ?? this.country,
    createdAt: createdAt ?? this.createdAt,
    customFields: customFields ?? this.customFields,
    defaultBillingAddress:
        defaultBillingAddress ?? this.defaultBillingAddress,
    defaultShippingAddress:
        defaultShippingAddress ?? this.defaultShippingAddress,
    fullName: fullName ?? this.fullName,
    id: id ?? this.id,
    phoneNumber: phoneNumber ?? this.phoneNumber,
    postalCode: postalCode ?? this.postalCode,
    province: province ?? this.province,
    streetLine1: streetLine1 ?? this.streetLine1,
    streetLine2: streetLine2 ?? this.streetLine2,
    updatedAt: updatedAt ?? this.updatedAt,
  );
}