Editable and lockable text field for item labels
This commit is contained in:
parent
aac93df46b
commit
65636ee956
|
|
@ -75,7 +75,16 @@ class _CheckList extends State<CheckList> {
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return Card(
|
return Card(
|
||||||
child: CheckboxListTile(
|
child: CheckboxListTile(
|
||||||
title: Text(list[index].text),
|
title: TextFormField(
|
||||||
|
enabled:
|
||||||
|
(listData != null && (!listData!.isTemplate! || _editable)),
|
||||||
|
decoration: InputDecoration(border: InputBorder.none),
|
||||||
|
initialValue: list[index].text,
|
||||||
|
onChanged: (value) {
|
||||||
|
list[index].text = value;
|
||||||
|
_updateItem(list[index]);
|
||||||
|
},
|
||||||
|
),
|
||||||
controlAffinity: ListTileControlAffinity.leading,
|
controlAffinity: ListTileControlAffinity.leading,
|
||||||
value: list[index].value,
|
value: list[index].value,
|
||||||
onChanged:
|
onChanged:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue