Checklist constructor

const Checklist({
  1. Key? key,
  2. required List<ChecklistLine> lines,
  3. bool enabled = true,
  4. required void onChanged(
    1. List<ChecklistLine>
    ),
})

A checklist with a list of lines.

The lines correspond to an entry in the checklist, with a text and whether they are toggled.

On each change in the checklist (a line is added, removed, toggled or its text is changed), the onChanged callback is fired with the new list of lines.

Implementation

const Checklist({
  super.key,
  required this.lines,
  this.enabled = true,
  required this.onChanged,
});