如何单击扩展标题?
我的意思是,当标题被轻拍并扩展/倒塌时,我想转到另一个视图。
这是我的代码:
ExpansionTile(
title: categories.isEmpty
? Text('no items')
: Text(categories[i].name),
children: getSubCategories(i),
);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
扩展Tile
按设计扩展,如果您希望孩子们可以选择一个具有输入的窗口小部件,或者用gesturedetector
将其包装。ExpansionTile
expands by design, if you want the children to be tappable either choose a widget that has onTap or wrap it withGestureDetector
.得到了解决方案。只需将文本小部件包裹在墨水中即可。
Got the solution. Just wrap the text Widget into an Inkwell.