copyWithCompanion method
Implementation
CountryData copyWithCompanion(CountryCompanion data) {
return CountryData(
id: data.id.present ? data.id.value : this.id,
code: data.code.present ? data.code.value : this.code,
name: data.name.present ? data.name.value : this.name,
nameInEnglish: data.nameInEnglish.present
? data.nameInEnglish.value
: this.nameInEnglish,
countryCode: data.countryCode.present
? data.countryCode.value
: this.countryCode,
isoCode2: data.isoCode2.present ? data.isoCode2.value : this.isoCode2,
isoCode3: data.isoCode3.present ? data.isoCode3.value : this.isoCode3,
population: data.population.present
? data.population.value
: this.population,
area: data.area.present ? data.area.value : this.area,
gdp: data.gdp.present ? data.gdp.value : this.gdp,
description: data.description.present
? data.description.value
: this.description,
);
}