Checklist constructor
const
Checklist({
- Key? key,
- required List<
ChecklistLine> lines, - bool enabled = true,
- bool checkedReadOnly = false,
- bool autofocusFirstLine = false,
- TextInputType keyboardType = TextInputType.text,
- TextInputAction textInputAction = TextInputAction.none,
- TextCapitalization textCapitalization = TextCapitalization.none,
- required void onChanged(),
- ChecklistLocalizations? localizations,
A checklist with a list of lines.
The lines correspond to the entries 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.
Set enabled to false to disable editing and toggling of the lines.
Set checkedReadOnly to make checked lines read only.
Set autofocusFirstLine to automatically focus the first line
(useful when creating the checklist for the first time with an empty line).
Override localizations to provide your own.
Implementation
const Checklist({
super.key,
required this.lines,
this.enabled = true,
this.checkedReadOnly = false,
this.autofocusFirstLine = false,
this.keyboardType = TextInputType.text,
this.textInputAction = TextInputAction.none,
this.textCapitalization = TextCapitalization.none,
required this.onChanged,
this.localizations,
});