【发布时间】:2019-08-22 07:18:43
【问题描述】:
我正在尝试在 Flutter 中实现类似的东西。
https://a.imge.to/2019/08/22/mgrjU.png
但我现在被困在这个问题上。
https://a.imge.to/2019/08/22/mgB62.png
操作按钮固定在 UI 的顶部,不随文本移动。有什么办法可以把他们打倒在裂片妖中?
我还没有找到一种方法来向 SliverAppBar 的 flexibleSpace 部分添加操作
SliverAppBar(
floating: false,
pinned: true,
expandedHeight: 150.0,
backgroundColor: Color.fromRGBO(58, 66, 86, 1.0),
flexibleSpace: const FlexibleSpaceBar(
title: Text("User Status", textAlign: TextAlign.justify,),
titlePadding: EdgeInsets.all(15.0),
),
actions: [
IconButton(
icon: Icon(Icons.refresh),
onPressed: () {},
),
IconButton(
icon: Icon(Icons.search),
onPressed: () {},
)
],
);
我希望操作按钮与标题文本一起出现。当用户滚动时,按钮应该随着标题文本移动。
【问题讨论】:
标签: flutter dart flutter-layout