copyWithCompanion method

FootballPlayerData copyWithCompanion(
  1. FootballPlayerCompanion data
)

Implementation

FootballPlayerData copyWithCompanion(FootballPlayerCompanion data) {
  return FootballPlayerData(
    id: data.id.present ? data.id.value : this.id,
    fullName: data.fullName.present ? data.fullName.value : this.fullName,
    birthday: data.birthday.present ? data.birthday.value : this.birthday,
    countryId: data.countryId.present ? data.countryId.value : this.countryId,
    imagePath: data.imagePath.present ? data.imagePath.value : this.imagePath,
    description: data.description.present
        ? data.description.value
        : this.description,
  );
}