受三星新版 One UI
的启发,我想在Flutter中使用 SliverAppBar
实现类似的功能 . 但我无法弄清楚......
根据One UI实现,SliverAppBar title
应该出现在扩展App Bar的中心(垂直和水平) . 同时,倒塌时应该坚持左侧 .
NOTE: 在我的情况下,应用程序栏还包含背景图像......因此,尝试用 Column
小部件包装 FlexibleSpaceBar
似乎使背景看起来很奇怪 .
我还希望在折叠时摆脱左边的额外填充(默认情况下,即使没有放置"leading"小部件也可以使用) . 此外,如果操作在展开时出现在 SliverAppBar
的底部会更好,这样用户就可以单手联系到他们......
一个用户界面:
Left ⇒ Expanded: Right ⇒ Collapsed:
- Actions on bottom - Actions as usual
- title is centered - title is on the left
(no unwanted padding on the left of title)