copyWith method
CountryData
copyWith(
{ - String? id,
- String? code,
- String? name,
- String? nameInEnglish,
- String? countryCode,
- String? isoCode2,
- String? isoCode3,
- int? population,
- int? area,
- Value<double?> gdp = const Value.absent(),
- Value<String?> description = const Value.absent(),
})
Implementation
CountryData copyWith({
String? id,
String? code,
String? name,
String? nameInEnglish,
String? countryCode,
String? isoCode2,
String? isoCode3,
int? population,
int? area,
Value<double?> gdp = const Value.absent(),
Value<String?> description = const Value.absent(),
}) => CountryData(
id: id ?? this.id,
code: code ?? this.code,
name: name ?? this.name,
nameInEnglish: nameInEnglish ?? this.nameInEnglish,
countryCode: countryCode ?? this.countryCode,
isoCode2: isoCode2 ?? this.isoCode2,
isoCode3: isoCode3 ?? this.isoCode3,
population: population ?? this.population,
area: area ?? this.area,
gdp: gdp.present ? gdp.value : this.gdp,
description: description.present ? description.value : this.description,
);