gop*_*ath 5 dart flutter flutter-widget
这是代码,任何人都可以帮助我:
Theme(
data: theme,
child: ListTileTheme(
contentPadding: EdgeInsets.all(0),
dense: true,
child: ExpansionTile(
title: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
GFCheckbox(
inactiveBgColor: kColorPrimaryDark,
inactiveBorderColor: Colors.white,
customBgColor: kColorPrimaryDark,
size: 15,
activeIcon: const Icon(
Icons.check,
size: 15,
color: Colors.white,
),
activeBgColor: kColorPrimaryDark,
onChanged: (value) {
setState(() {
isChecked = value;
});
},
value: isChecked,
inactiveIcon: null,
),
SizedBox(
width: 5,
),
textWidget(color: Colors.white, size: 12, text: root.title),
],
),
key: PageStorageKey<DataList>(root),
children: root.children.map(_buildTiles).toList(),
),
),
);
Run Code Online (Sandbox Code Playgroud)
尝试下面的代码添加childrenPadding和tilePadding
ExpansionTile(
childrenPadding: EdgeInsets.zero,
tilePadding: EdgeInsets.zero,
),
Run Code Online (Sandbox Code Playgroud)
MediaQuery.removePadding(
removeTop: true,
removeBottom: true,
// removeLeft: true,
// removeRight: true,
context: context,
child: ExpansionTile(
childrenPadding: EdgeInsets.zero,
tilePadding: EdgeInsets.zero,
),
),
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4541 次 |
| 最近记录: |