在FLUTTER中滚动列表视图时如何在顶部固定标签?

问题描述 投票:0回答:1

需要像附件中的gif一样在颤动中创建布局。

同时滚动固定在屏幕顶部的tabscroll内部的tabbar内容。

[已试过SliverAppBar,但无法设置自定义小部件UI,就像在Instagram中显示一样。

Demo_GIF

flutter flutter-layout
1个回答
0
投票

您可以做到,而且很简单。您可以记得SliverAppBar具有固定属性,您的解决方案是这个。enter image description here

结果:

<< img src =“ https://image.soinside.com/eyJ1cmwiOiAiaHR0cHM6Ly90aHVtYnMuZ2Z5Y2F0LmNvbS9GbGFreURpc2NyZXRlR2lsYW1vbnN0ZXItc2l6ZV9yZXN0>

如果需要详细信息,请查看at this(lib / instagram-ui)。

© www.soinside.com 2019 - 2024. All rights reserved.