Flutter 颤振:嵌套的ListView工作。嵌套滑动列表don';t、 然而,ListView包含一些碎片
我遇到了一个特别的问题。我能够组成一个垂直的外部Flutter 颤振:嵌套的ListView工作。嵌套滑动列表don';t、 然而,ListView包含一些碎片,flutter,listview,flutter-sliver,customscrollview,Flutter,Listview,Flutter Sliver,Customscrollview,我遇到了一个特别的问题。我能够组成一个垂直的外部ListView,其中包含水平ListViews。可以将其视为Facebook上的多个好友建议行堆叠在一起。这个很好用 因为我想利用SliverAppBar附带的额外功能,我需要有一个CustomScrollView作为父小部件,然后只在其slivers集合中添加slivers 当我试图在SliverChildBuilderDelegate中添加一个SliverList时,我得到了各种各样的错误,大多数是渲染相关类型的错误。似乎SliverChil
ListView
,其中包含水平ListView
s。可以将其视为Facebook上的多个好友建议行堆叠在一起。这个很好用
因为我想利用SliverAppBar
附带的额外功能,我需要有一个CustomScrollView
作为父小部件
,然后只在其slivers
集合中添加slivers
当我试图在SliverChildBuilderDelegate
中添加一个SliverList
时,我得到了各种各样的错误,大多数是渲染相关类型的错误。似乎SliverChildBuilderDelegate
可以构建的子类中存在约束
NEEDS-COMPOSITING-BITS-UPDATE:
needs compositing
creator: Viewport ← IgnorePointer-[GlobalKey#a5a09] ← Semantics ← Listener ← _GestureSemantics ←
RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#db221] ← Listener ← _ScrollableScope
← _ScrollSemantics-[GlobalKey#57142] ← Scrollable ← CustomScrollView ← Padding ← ⋯
parentData: <none> (can use size)
constraints: BoxConstraints(w=412.0, 0.0<=h<=Infinity)
size: MISSING
axisDirection: right
crossAxisDirection: down
offset: ScrollPositionWithSingleContext#415a2(offset: 0.0, range: null..null, viewport: null,
ScrollableState, BouncingScrollPhysics -> RangeMaintainingScrollPhysics, IdleScrollActivity#74aea,
ScrollDirection.idle)
anchor: 0.0
This RenderObject had the following child:
center child: RenderSliverList#5219f NEEDS-LAYOUT NEEDS-PAINT
════════════════════════════════════════════════════════════════════════════════════════════════════
Another exception was thrown: RenderBox was not laid out: RenderViewport#e26b4 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
Another exception was thrown: RenderBox was not laid out: RenderViewport#e26b4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
Another exception was thrown: RenderBox was not laid out: RenderIgnorePointer#e30f7 relayoutBoundary=up10 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#d70ab relayoutBoundary=up9 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE
NEEDS-composing-BITS-UPDATE:
需要合成
创建者:视口← IgnorePointer-[GlobalKey#a5a09]← 语义学← 听众← _手势语义学←
RawGestureDetector-[标签为Lobalkey#db221]← 听众← _可滚动示波器
← _滚动语义-[GlobalKey#57142]← 可滚动← 自定义滚动视图← 衬垫← ⋯
parentData:(可以使用大小)
约束:BoxConstraints(w=412.0,0.0已解决。我所缺少的是嵌套的滑动列表的容器中的高度和宽度