copyWith method

Address copyWith({
  1. String? houseNumber,
  2. String? road,
  3. String? neighbourhood,
  4. String? suburb,
  5. String? city,
  6. String? district,
  7. String? state,
  8. int? postalCode,
  9. String? country,
  10. String? countryCode,
  11. Locale? locale,
})

Copy this Address with the given attributes if given not null.

Implementation

Address copyWith({
  String? houseNumber,
  String? road,
  String? neighbourhood,
  String? suburb,
  String? city,
  String? district,
  String? state,
  int? postalCode,
  String? country,
  String? countryCode,
  Locale? locale,
}) {
  return Address(
    houseNumber: houseNumber ?? this.houseNumber,
    road: road ?? this.road,
    neighbourhood: neighbourhood ?? this.neighbourhood,
    suburb: suburb ?? this.suburb,
    city: city ?? this.city,
    district: district ?? this.district,
    state: state ?? this.state,
    postalCode: postalCode ?? this.postalCode,
    country: country ?? this.country,
    countryCode: countryCode ?? this.countryCode,
    locale: locale ?? this.locale,
  );
}