copyWith method
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,
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,
);