copyWith method

AddressModel copyWith({
  1. String? street,
  2. String? number,
  3. String? city,
  4. String? state,
  5. String? country,
  6. String? zipCode,
  7. String? district,
})

Implementation

AddressModel copyWith({
  String? street,
  String? number,
  String? city,
  String? state,
  String? country,
  String? zipCode,
  String? district,
}) {
  return AddressModel(
    street: street ?? this.street,
    number: number ?? this.number,
    city: city ?? this.city,
    state: state ?? this.state,
    country: country ?? this.country,
    zipCode: zipCode ?? this.zipCode,
    district: district ?? this.district,
  );
}