tp7309 / flutter_sticky_and_expandable_list

粘性头部与分组列表Sliver实现 Build a grouped list, which support expand/collapse section and sticky headers, support use it with sliver widget.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error NoSuchMethodError in the example

karavanov opened this issue · comments

When building any example, an error is written in the debag (I attach the log below). What is the reason for it and how to fix it? When scrolling the list, it is repeated.

Flutter 1.17.0
Dart 2.8.1

debug log

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Xcode build done. 9,4s

�[38;5;248m════════ Exception caught by rendering library ═════════════════════════════════�[39;49m
�[38;5;244mThe following NoSuchMethodError was thrown during performLayout():�[39;49m
The method '>' was called on null.
Receiver: null
Tried calling: >(0)

�[38;5;244mThe relevant error-causing widget was�[39;49m
�[38;5;248mExpandableSectionContainer�[39;49m
�[38;5;244mWhen the exception was thrown, this was the stack�[39;49m
�[38;5;244m#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)�[39;49m
�[38;5;248m#1 RenderExpandableSectionContainer.performLayout�[39;49m
�[38;5;244m#2 RenderObject.layout�[39;49m
�[38;5;244m#3 RenderProxyBoxMixin.performLayout�[39;49m
�[38;5;244m#4 RenderObject.layout�[39;49m
�[38;5;244m...�[39;49m
�[38;5;244mThe following RenderObject was being processed when the exception was fired: RenderExpandableSectionContainer#0ab60 relayoutBoundary=up5 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE�[39;49m
�[38;5;244mRenderObject: RenderExpandableSectionContainer#0ab60 relayoutBoundary=up5 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE�[39;49m
�[38;5;244mneeds compositing�[39;49m
�[38;5;244mparentData: (can use size)�[39;49m
�[38;5;244mconstraints: BoxConstraints(w=414.0, 0.0<=h<=Infinity)�[39;49m
�[38;5;244msize: Size(414.0, 224.0)�[39;49m
�[38;5;244mchild 1: RenderClipRect#cabbc relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE�[39;49m
�[38;5;244mparentData: offset=Offset(0.0, 56.0); id=null (can use size)�[39;49m
�[38;5;244mconstraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity)�[39;49m
�[38;5;244msize: Size(414.0, 168.0)�[39;49m
�[38;5;244mchild: RenderPositionedBox#807d2 relayoutBoundary=up7 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE�[39;49m
�[38;5;244mparentData: (can use size)�[39;49m
�[38;5;244mconstraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity)�[39;49m
�[38;5;244msize: Size(414.0, 168.0)�[39;49m
�[38;5;244malignment: AlignmentDirectional.centerStart�[39;49m
�[38;5;244mtextDirection: ltr�[39;49m
�[38;5;244mwidthFactor: expand�[39;49m
�[38;5;244mheightFactor: 1.0�[39;49m
�[38;5;244mchild: RenderFlex#b3e29 relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE�[39;49m
�[38;5;244mparentData: offset=Offset(0.0, 0.0) (can use size)�[39;49m
�[38;5;244mconstraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity)�[39;49m
�[38;5;244msize: Size(414.0, 168.0)�[39;49m
�[38;5;244mdirection: vertical�[39;49m
�[38;5;244mmainAxisAlignment: start�[39;49m
�[38;5;244mmainAxisSize: max�[39;49m
�[38;5;244mcrossAxisAlignment: center�[39;49m
�[38;5;244mverticalDirection: down�[39;49m
�[38;5;244mchild 1: RenderSemanticsAnnotations#16f4f relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE�[39;49m
�[38;5;244mparentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)�[39;49m
�[38;5;244mconstraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity)�[39;49m
�[38;5;244msize: Size(414.0, 56.0)�[39;49m
�[38;5;244mchild 2: RenderSemanticsAnnotations#441e3 relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE�[39;49m
�[38;5;244mparentData: offset=Offset(0.0, 56.0); flex=null; fit=null (can use size)�[39;49m
�[38;5;244mconstraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity)�[39;49m
�[38;5;244msize: Size(414.0, 56.0)�[39;49m
�[38;5;244mchild 3: RenderSemanticsAnnotations#2956d relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE�[39;49m
�[38;5;244mparentData: offset=Offset(0.0, 112.0); flex=null; fit=null (can use size)�[39;49m
�[38;5;244mconstraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity)�[39;49m
�[38;5;244msize: Size(414.0, 56.0)�[39;49m
�[38;5;244mchild 2: _RenderColoredBox#2653f relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE�[39;49m
�[38;5;244mparentData: offset=Offset(0.0, 0.0); id=null (can use size)�[39;49m
�[38;5;244mconstraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity)�[39;49m
�[38;5;244msize: Size(414.0, 56.0)�[39;49m
�[38;5;244mbehavior: opaque�[39;49m
�[38;5;244mchild: RenderSemanticsAnnotations#51d35 relayoutBoundary=up7 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE�[39;49m
�[38;5;244mparentData: (can use size)�[39;49m
�[38;5;244mconstraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity)�[39;49m
�[38;5;244msize: Size(414.0, 56.0)�[39;49m
�[38;5;244mchild: RenderMouseRegion#d1710 relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE�[39;49m
�[38;5;244mparentData: (can use size)�[39;49m
�[38;5;244mconstraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity)�[39;49m
�[38;5;244msize: Size(414.0, 56.0)�[39;49m
�[38;5;244mlisteners: enter, exit�[39;49m
�[38;5;244mchild: RenderSemanticsGestureHandler#ba4af relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE�[39;49m
�[38;5;244mparentData: (can use size)�[39;49m
�[38;5;244mconstraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity)�[39;49m
�[38;5;244msize: Size(414.0, 56.0)�[39;49m
�[38;5;244mgestures: tap�[39;49m
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

�[38;5;248m════════ Exception caught by rendering library ═════════════════════════════════�[39;49m
The method '>' was called on null.
Receiver: null
Tried calling: >(0)
�[38;5;244mThe relevant error-causing widget was�[39;49m
�[38;5;248mExpandableSectionContainer�[39;49m
�[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m

I'am a little busy today, tomorrow I will find an iphone11 device to test it.

I have fixed this bug, you can pull the lastest code to test it. If you have no other issues, I will publish version 0.2.1 at 05-13 00:00(GMT time).

that helped, great ;)

commented

It's solved. Thanks!!! You can publish

@brian2694 I have published 0.2.1 at 05-13, you can use this library now ^_^