SliverPersistentHeader
全部标签 对flutter的CustomScrollView有疑问我现在拥有的是:@overrideWidgetbuild(BuildContextcontext){returnContainer(child:CustomScrollView(shrinkWrap:true,slivers:[SliverPadding(padding:EdgeInsets.all(0),sliver:SliverList(delegate:SliverChildListDelegate([Card(),Card(),Container(child:ListView.builder(physics:constNe
对flutter的CustomScrollView有疑问我现在拥有的是:@overrideWidgetbuild(BuildContextcontext){returnContainer(child:CustomScrollView(shrinkWrap:true,slivers:[SliverPadding(padding:EdgeInsets.all(0),sliver:SliverList(delegate:SliverChildListDelegate([Card(),Card(),Container(child:ListView.builder(physics:constNe
我正在与Slivers合作。我有一个SliverAppBar,然后是一个SliverPersistentHeader,最后是一个SliverList。我想要实现的行为是SliverAppBar滚出屏幕,但SliverPersistentHeader保持固定在屏幕顶部。我能够做到这一点,但SliverPersistentHeader与android状态栏重叠。关于如何解决这个问题的任何想法?最后是代码classExampleAppextendsStatelessWidget{@overrideWidgetbuild(BuildContextcontext){returnCustomScr
我的主页有SliverPersistentHeader和TabBarView如下代码:@overrideWidgetbuild(BuildContextcontext){returnScaffold(backgroundColor:Theme.of(context).backgroundColor,body:DefaultTabController(length:3,child:NestedScrollView(headerSliverBuilder:(BuildContextcontext,boolinnerBoxIsScrolled){return[SliverAppBar(exp
我在我的CustomScrollView中使用了一个SliverPersistentHeader来拥有一个在用户滚动时会收缩和增长的持久header,但是当它达到其最大尺寸时,它会感觉有点僵硬,因为它不会“过度生长”。这是我想要的行为的视频(来自Spotify应用)和我的行为:. 最佳答案 在寻找解决此问题的方法时,我遇到了三种不同的解决方法:创建一个Stack,其中包含CustomScrollView和一个标题小部件(覆盖在ScrollView的顶部),提供一个ScrollController给CustomScrollView并将