copyWith method

CountryModel copyWith({
  1. String? countryName,
  2. Set<String>? regions,
  3. String? iso2Code,
  4. String? flag,
  5. String? intlDialCode,
  6. String? format,
  7. int? orderPriority,
  8. Set<String>? areaCodes,
  9. String? currentAreaCode,
})

Implementation

CountryModel copyWith({
  String? countryName,
  Set<String>? regions,
  String? iso2Code,
  String? flag,
  String? intlDialCode,
  String? format,
  int? orderPriority,
  Set<String>? areaCodes,
  String? currentAreaCode,
}) {
  return CountryModel(
    countryName: countryName ?? this.countryName,
    regions: regions ?? this.regions,
    iso2Code: iso2Code ?? this.iso2Code,
    flag: flag ?? this.flag,
    intlDialCode: intlDialCode ?? this.intlDialCode,
    format: format ?? this.format,
    orderPriority: orderPriority ?? this.orderPriority,
    areaCodes: areaCodes ?? this.areaCodes,
    currentAreaCode: currentAreaCode ?? this.currentAreaCode,
  );
}