copyWith method

Country copyWith({
  1. String? name,
  2. List<String>? topLevelDomain,
  3. String? alpha2Code,
  4. String? alpha3Code,
  5. List<String>? callingCodes,
  6. String? capital,
  7. List<String>? altSpellings,
  8. String? subregion,
  9. String? region,
  10. int? population,
  11. List<int>? latlng,
  12. String? demonym,
  13. int? area,
  14. List<String>? timezones,
  15. List<String>? borders,
  16. String? nativeName,
  17. String? numericCode,
  18. Flags? flags,
  19. List<Currency>? currencies,
  20. List<Language>? languages,
  21. Translations? translations,
  22. String? flag,
  23. List<RegionalBloc>? regionalBlocs,
  24. String? cioc,
  25. bool? independent,
  26. List<String>? cities,
})

Implementation

Country copyWith({
  String? name,
  List<String>? topLevelDomain,
  String? alpha2Code,
  String? alpha3Code,
  List<String>? callingCodes,
  String? capital,
  List<String>? altSpellings,
  String? subregion,
  String? region,
  int? population,
  List<int>? latlng,
  String? demonym,
  int? area,
  List<String>? timezones,
  List<String>? borders,
  String? nativeName,
  String? numericCode,
  Flags? flags,
  List<Currency>? currencies,
  List<Language>? languages,
  Translations? translations,
  String? flag,
  List<RegionalBloc>? regionalBlocs,
  String? cioc,
  bool? independent,
  List<String>? cities,
}) =>
    Country(
      name: name ?? this.name,
      topLevelDomain: topLevelDomain ?? this.topLevelDomain,
      alpha2Code: alpha2Code ?? this.alpha2Code,
      alpha3Code: alpha3Code ?? this.alpha3Code,
      callingCodes: callingCodes ?? this.callingCodes,
      capital: capital ?? this.capital,
      altSpellings: altSpellings ?? this.altSpellings,
      subregion: subregion ?? this.subregion,
      region: region ?? this.region,
      population: population ?? this.population,
      latlng: latlng ?? this.latlng,
      demonym: demonym ?? this.demonym,
      area: area ?? this.area,
      timezones: timezones ?? this.timezones,
      borders: borders ?? this.borders,
      nativeName: nativeName ?? this.nativeName,
      numericCode: numericCode ?? this.numericCode,
      flags: flags ?? this.flags,
      currencies: currencies ?? this.currencies,
      languages: languages ?? this.languages,
      translations: translations ?? this.translations,
      flag: flag ?? this.flag,
      regionalBlocs: regionalBlocs ?? this.regionalBlocs,
      cioc: cioc ?? this.cioc,
      independent: independent ?? this.independent,
      cities: cities ?? this.cities,
    );