如何从CheckboxListTile
删除内部填充?
我试过了:
contentPadding:EdgeInsets.all(0),
密集:正确,
两者都有帮助,但它们不会删除复选框和文本之间的内部填充
这是我的代码:
CheckboxListTile(
title: Text('Remember me'),
controlAffinity: ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0),
dense: true,
value: isPrefered,
onChanged: (bool value) => setState(() => isPrefered = value),
),
)
答案 0 :(得分:0)
ListTileTheme(
contentPadding: EdgeInsets.all(0),
child: CheckboxListTile(
secondary: const Icon(Icons.drive_eta),
title: Text("Your message"),
onChanged: (bool value) {},
value: true,
),
),
尝试一下