【发布时间】:2020-02-28 09:28:45
【问题描述】:
如何在展开我的 ExpansionTile 并为其设置 Padding 时移除分隔线?
return Card(
borderOnForeground: false,
key: Key("${e.id}"),
child: Padding(
padding: EdgeInsets.only(bottom: 8.0),
child: ExpansionTile(
backgroundColor: Theme.of(context).accentColor,
title: Text(
e.title,
style: Theme.of(context).textTheme.bodyText1,
maxLines: 1,
),
subtitle: Text(e.by),
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[ Text("${e.descendants} comments"),Icon(Icons.open_in_new)],)
],
),
),
);
这是我的屏幕截图 enter image description here
【问题讨论】:
-
这个设备是
ExpansionTile边界。您可以简单地复制并粘贴所有ExpansionTileWidget 并从中删除BorderSide(color: borderSideColor)