📜  如何在 Flutter 中为 Checkbox 添加标签(标题文本)? - 飞镖代码示例

📅  最后修改于: 2022-03-11 14:48:05.709000             🧑  作者: Mango

代码示例1
bool isChecked = false;
CheckboxListTile(
            title: Text('CheckboxTitle'),
            subtitle: Text('subtitle'),
            secondary: Icon(Icons.delete),
            controlAffinity: ListTileControlAffinity.leading, // ListTileControlAffinity.trailing
            value: isChecked,
            onChanged: (v) {
              setState(() {
                isChecked = v!;
              });
            },
          ),