copyWith method

UFUAddressModel copyWith({
  1. String? id,
  2. String? address,
  3. String? address1,
  4. String? address2,
  5. String? completeAddress,
  6. String? city,
  7. String? state,
  8. String? country,
  9. String? postcode,
  10. double? latitude,
  11. double? longitude,
  12. String? placeId,
  13. int? userId,
  14. DateTime? createdAt,
  15. DateTime? updatedAt,
})

Implementation

UFUAddressModel copyWith({
  String? id,
  String? address,
  String? address1,
  String? address2,
  String? completeAddress,
  String? city,
  String? state,
  String? country,
  String? postcode,
  double? latitude,
  double? longitude,
  String? placeId,
  int? userId,
  DateTime? createdAt,
  DateTime? updatedAt,
}) {
  return UFUAddressModel(
    id: id ?? this.id,
    address: address ?? this.address,
    address1: address1 ?? this.address1,
    address2: address2 ?? this.address2,
    completeAddress: completeAddress ?? this.completeAddress,
    city: city ?? this.city,
    state: state ?? this.state,
    country: country ?? this.country,
    postcode: postcode ?? this.postcode,
    latitude: latitude ?? this.latitude,
    longitude: longitude ?? this.longitude,
    placeId: placeId ?? this.placeId,
    userId: userId ?? this.userId,
    createdAt: createdAt ?? this.createdAt,
    updatedAt: updatedAt ?? this.updatedAt,
  );
}