lines property

List<ChecklistLine> lines
final

The list of entries to display in the checklist, with a text and whether they are toggled.

They are only read when the checklist is created: changing them afterwards has no effect. To reset the checklist with new lines, also give it a new key, for example a ValueKey of the lines or of their source.

Checklist(
  // A new key creates a new checklist from the new lines
  key: ValueKey(note.id),
  lines: note.lines,
  onChanged: (lines) => note.lines = lines,
)

Implementation

final List<ChecklistLine> lines;