Mic*_*sma 13 dart flutter flutter-layout
我希望在我的 CheckboxListTiles 行周围删除此填充,但没有找到有关如何在不制作我自己的复选框版本的情况下执行此操作的任何信息。
有没有办法(使用CheckboxListTile):
Uni*_*Uni 12
更新:ListTitleTheme不再需要使用了。contentPadding现在是CheckboxListTile的属性之一。我们现在可以padding像这样删除默认值:
CheckboxListTile(
contentPadding: EdgeInsets.all(0),
)
Run Code Online (Sandbox Code Playgroud)
小智 10
消除复选框和标题之间间隙的正确方法是使用horizontalTitleGap
ListTileTheme(
horizontalTitleGap: 0.0,
child: CheckboxListTile(
secondary: const Icon(Icons.drive_eta),
title: Text("Your message"),
onChanged: (bool value) {},
value: true,
),
),
Run Code Online (Sandbox Code Playgroud)
尝试使用以下代码:
ListTileTheme(
contentPadding: EdgeInsets.all(0),
child: CheckboxListTile(
secondary: const Icon(Icons.drive_eta),
title: Text("Your message"),
onChanged: (bool value) {},
value: true,
),
),
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9786 次 |
| 最近记录: |