Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 在颤振中的滑动条和滑动列表之间添加空格_Flutter_Flutter Sliver - Fatal编程技术网

Flutter 在颤振中的滑动条和滑动列表之间添加空格

Flutter 在颤振中的滑动条和滑动列表之间添加空格,flutter,flutter-sliver,Flutter,Flutter Sliver,我有一个滑动条,下面是一个滑动列表 第一个SliverList项太靠近SliverAppBar。我想在两者之间添加一些间距,无论是通过滑动条下方的底部边距还是滑动列表上方的底部边距 如何做到这一点?-p>将此小部件包装起来 您的解决方案应该如下所示: SliverPadding( padding: EdgeInsets.only(bottom: 8.0) sliver: SliverAppBar(...) ) 或 MediaQuery.removePadding帮助了我。 Sliver

我有一个滑动条,下面是一个滑动列表

第一个SliverList项太靠近SliverAppBar。我想在两者之间添加一些间距,无论是通过滑动条下方的底部边距还是滑动列表上方的底部边距

如何做到这一点?

-p>将此小部件包装起来

您的解决方案应该如下所示:

SliverPadding(
  padding: EdgeInsets.only(bottom: 8.0)
  sliver: SliverAppBar(...)
)


MediaQuery.removePadding帮助了我。
SliverPadding(
  padding: EdgeInsets.only(top: 8.0)
  sliver: SliverList(...)
)