Checklist constructor
const
Checklist({
- Key? key,
- required List<
ChecklistLine> lines, - bool enabled = true,
- required void onChanged(),
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,
});