copyWith method

Address copyWith({
  1. String? addressName,
  2. String? fullname,
  3. String? address,
  4. String? note,
  5. String? latitude,
  6. int? addressId,
  7. String? longitude,
  8. int? customerAddressID,
  9. String? phoneNumber,
  10. int? countryID,
  11. String? countryName,
  12. int? provinceID,
  13. String? provinceName,
  14. int? cityID,
  15. String? cityName,
  16. int? districtID,
  17. String? districtName,
  18. int? subdistrictID,
  19. String? subdistrictName,
  20. String? postalCode,
  21. String? addressNotes,
  22. bool? isDefault,
  23. ShippingCoverage? shippingCoverage,
  24. String? langtitude,
  25. String? longtitude,
})

Implementation

Address copyWith({
  String? addressName,
  String? fullname,
  String? address,
  String? note,
  String? latitude,
  int? addressId,
  String? longitude,
  int? customerAddressID,
  String? phoneNumber,
  int? countryID,
  String? countryName,
  int? provinceID,
  String? provinceName,
  int? cityID,
  String? cityName,
  int? districtID,
  String? districtName,
  int? subdistrictID,
  String? subdistrictName,
  String? postalCode,
  String? addressNotes,
  bool? isDefault,
  ShippingCoverage? shippingCoverage,
  String? langtitude,
  String? longtitude,
}) {
  return Address(
    addressName: addressName ?? this.addressName,
    fullname: fullname ?? this.fullname,
    address: address ?? this.address,
    note: note ?? this.note,
    latitude: latitude ?? this.latitude,
    addressId: addressId ?? this.addressId,
    longitude: longitude ?? this.longitude,
    customerAddressID: customerAddressID ?? this.customerAddressID,
    phoneNumber: phoneNumber ?? this.phoneNumber,
    countryID: countryID ?? this.countryID,
    countryName: countryName ?? this.countryName,
    provinceID: provinceID ?? this.provinceID,
    provinceName: provinceName ?? this.provinceName,
    cityID: cityID ?? this.cityID,
    cityName: cityName ?? this.cityName,
    districtID: districtID ?? this.districtID,
    districtName: districtName ?? this.districtName,
    subdistrictID: subdistrictID ?? this.subdistrictID,
    subdistrictName: subdistrictName ?? this.subdistrictName,
    postalCode: postalCode ?? this.postalCode,
    addressNotes: addressNotes ?? this.addressNotes,
    isDefault: isDefault ?? this.isDefault,
    shippingCoverage: shippingCoverage ?? this.shippingCoverage?.copyWith(),
    langtitude: langtitude ?? this.langtitude,
    longtitude: longtitude ?? this.longtitude,
  );
}