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

'Method '_add from Integer' was called on Null' error on launch of the app

emvaized opened this issue · comments

This error occurs on every launch of the app, even if there's no SliverExpandableList widget built on the screen.

Screenshot_20200316_181606

Here's the log:

I/flutter ( 5599): The method '_addFromInteger' was called on null.
I/flutter ( 5599): Receiver: null
I/flutter ( 5599): Tried calling: _addFromInteger(1)
I/flutter ( 5599): 
I/flutter ( 5599): The relevant error-causing widget was:
I/flutter ( 5599):   Feed-[LabeledGlobalKey<FeedState>#fb6be]
I/flutter ( 5599):   file:///home/max/%D0%9A%D0%BE%D0%B4/Flutter%20Projects/Feed-master/lib/main.dart:257:15
I/flutter ( 5599): 
I/flutter ( 5599): When the exception was thrown, this was the stack:
I/flutter ( 5599): #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
I/flutter ( 5599): #1      int.+ (dart:core-patch/integers.dart:12:38)
I/flutter ( 5599): #2      SliverExpandableChildDelegate._buildSectionRealIndexes (package:sticky_and_expandable_list/src/sliver_expandable_list.dart:168:22)
I/flutter ( 5599): #3      new SliverExpandableChildDelegate (package:sticky_and_expandable_list/src/sliver_expandable_list.dart:69:30)

Ensure all section object in sectionList is not null.
try flutter clean , then run your project again.

Ensure all section object in sectionList is not null.
try flutter clean , then run your project again.

Works now! 👍