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.
MIT License
140 stars 29 forks source link

Error NoSuchMethodError in the example #9

Closed karavanov closed 4 years ago

karavanov commented 4 years ago

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

════════ Exception caught by rendering library ═════════════════════════════════ The following NoSuchMethodError was thrown during performLayout(): The method '>' was called on null. Receiver: null Tried calling: >(0)

The relevant error-causing widget was ExpandableSectionContainer When the exception was thrown, this was the stack #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5) #1 RenderExpandableSectionContainer.performLayout #2 RenderObject.layout #3 RenderProxyBoxMixin.performLayout #4 RenderObject.layout ... The following RenderObject was being processed when the exception was fired: RenderExpandableSectionContainer#0ab60 relayoutBoundary=up5 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE RenderObject: RenderExpandableSectionContainer#0ab60 relayoutBoundary=up5 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE needs compositing parentData: (can use size) constraints: BoxConstraints(w=414.0, 0.0<=h<=Infinity) size: Size(414.0, 224.0) child 1: RenderClipRect#cabbc relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE parentData: offset=Offset(0.0, 56.0); id=null (can use size) constraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity) size: Size(414.0, 168.0) child: RenderPositionedBox#807d2 relayoutBoundary=up7 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE parentData: (can use size) constraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity) size: Size(414.0, 168.0) alignment: AlignmentDirectional.centerStart textDirection: ltr widthFactor: expand heightFactor: 1.0 child: RenderFlex#b3e29 relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE parentData: offset=Offset(0.0, 0.0) (can use size) constraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity) size: Size(414.0, 168.0) direction: vertical mainAxisAlignment: start mainAxisSize: max crossAxisAlignment: center verticalDirection: down child 1: RenderSemanticsAnnotations#16f4f relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size) constraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity) size: Size(414.0, 56.0) child 2: RenderSemanticsAnnotations#441e3 relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE parentData: offset=Offset(0.0, 56.0); flex=null; fit=null (can use size) constraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity) size: Size(414.0, 56.0) child 3: RenderSemanticsAnnotations#2956d relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE parentData: offset=Offset(0.0, 112.0); flex=null; fit=null (can use size) constraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity) size: Size(414.0, 56.0) child 2: _RenderColoredBox#2653f relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE parentData: offset=Offset(0.0, 0.0); id=null (can use size) constraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity) size: Size(414.0, 56.0) behavior: opaque child: RenderSemanticsAnnotations#51d35 relayoutBoundary=up7 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE parentData: (can use size) constraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity) size: Size(414.0, 56.0) child: RenderMouseRegion#d1710 relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE parentData: (can use size) constraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity) size: Size(414.0, 56.0) listeners: enter, exit child: RenderSemanticsGestureHandler#ba4af relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE parentData: (can use size) constraints: BoxConstraints(0.0<=w<=414.0, 0.0<=h<=Infinity) size: Size(414.0, 56.0) gestures: tap ════════════════════════════════════════════════════════════════════════════════

════════ Exception caught by rendering library ═════════════════════════════════ The method '>' was called on null. Receiver: null Tried calling: >(0) The relevant error-causing widget was ExpandableSectionContainer ════════════════════════════════════════════════════════════════════════════════

tp7309 commented 4 years ago

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

karavanov commented 4 years ago

Okay, thank you!

— Best regards Nikolai


From: tp7309 notifications@github.com Sent: Monday, May 11, 2020 5:11:27 PM To: tp7309/flutter_sticky_and_expandable_list flutter_sticky_and_expandable_list@noreply.github.com Cc: Nickolay karavanov@hotmail.com; Manual manual@noreply.github.com Subject: Re: [tp7309/flutter_sticky_and_expandable_list] Error NoSuchMethodError in the example (#9)

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/tp7309/flutter_sticky_and_expandable_list/issues/9#issuecomment-626725807, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEF2MHAG5SXY7U3CNVVMLYTRRABQ7ANCNFSM4M5MSD4Q.

tp7309 commented 4 years ago

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).

karavanov commented 4 years ago

that helped, great ;)

brian2694 commented 4 years ago

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

tp7309 commented 4 years ago

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