我想降低一個expansionTile的高度,
我已經嘗試過ConfigurableExpansionTile但它不支持空安全性,所以我不能在我的專案中使用它。
我還將我的ExpansionTile包裝在ListTileTheme中:
return ListTileTheme(
dense: true,
child: ExpansionTile(
它降低了高度,但對我來說仍然不夠。
如果您有解決方案,感謝您的幫助。
uj5u.com熱心網友回復:
我不知道 ExpansionTile 但您可以使用ExpandablePanel,它可以滿足您的目的,您可以輕松自定義小部件的高度。它還支持空安全。
ExpandablePanel(
theme: const ExpandableThemeData(
headerAlignment:
ExpandablePanelHeaderAlignment.center,
//tapBodyToExpand: true,
//tapBodyToCollapse: true,
hasIcon: false,
),
header: Expandable(
collapsed: buildCollapsed(), // widget header when the widget is
Collapsed
expanded: buildExpanded(), // header when the widget is Expanded
),
collapsed: Container(), // body when the widget is Collapsed, I didnt
need anything here.
expanded: expandedColumn() // body when the widget is Expanded
)
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/409967.html
標籤:
