CustomScrollView 中的 Flutter 浮动操作按钮

Flutter floating action button in a CustomScrollView

有没有办法在由带有 SliverAppBar 和 SliverList 的 CustomScrollView 组成的屏幕中包含浮动操作按钮?

我希望能够在屏幕上固定带有 FAB 的条子列表的默认行为。

可能吗?

您在使用 SliverAppBar 时仍然可以使用脚手架,例如:

new Scaffold(
  body: new CustomScrollView(
    slivers: <Widget>[
      new SliverAppBar(...),
      ...
    ],
  ),
  floatingActionButton: new FloatingActionButton(...),
);

否则,您通常也可以在 CustomScrollView 和 FloatingActionButton(在 Positioned 中)上方使用 Stack。