toCompanion method

CountryCompanion toCompanion(
  1. bool nullToAbsent
)

Implementation

CountryCompanion toCompanion(bool nullToAbsent) {
  return CountryCompanion(
    id: Value(id),
    code: Value(code),
    name: Value(name),
    nameInEnglish: Value(nameInEnglish),
    countryCode: Value(countryCode),
    isoCode2: Value(isoCode2),
    isoCode3: Value(isoCode3),
    population: Value(population),
    area: Value(area),
    gdp: gdp == null && nullToAbsent ? const Value.absent() : Value(gdp),
    description: description == null && nullToAbsent
        ? const Value.absent()
        : Value(description),
  );
}