copyWithCompanion method

NoteData copyWithCompanion(
  1. NoteCompanion data
)

Implementation

NoteData copyWithCompanion(NoteCompanion data) {
  return NoteData(
    id: data.id.present ? data.id.value : this.id,
    title: data.title.present ? data.title.value : this.title,
    content: data.content.present ? data.content.value : this.content,
    createDateTime: data.createDateTime.present
        ? data.createDateTime.value
        : this.createDateTime,
    colorCode: data.colorCode.present ? data.colorCode.value : this.colorCode,
  );
}