sticky_grouped_list icon indicating copy to clipboard operation
sticky_grouped_list copied to clipboard

Exception when list is on scroll more and new items(chats) are added to stream.

Open ericel opened this issue 4 years ago • 2 comments

I get the following exception when list is in load more and chat items are added to scream.

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following RangeError was thrown building StreamBuilder<int>(dirty, state:
_StreamBuilderBaseState<int, AsyncSnapshot<int>>#1312e):
RangeError (index): Invalid value: Not in inclusive range 0..19: 59
The relevant error-causing widget was:

package:app/…/state_widgets/chat_home_widget.dart:182
When the exception was thrown, this was the stack:
#0      List.[] (dart:core-patch/growable_array.dart:166:60)
#1      _StickyGroupedListViewState._showFixedGroupHeader
package:sticky_grouped_list/sticky_grouped_list.dart:324
#2      _StickyGroupedListViewState.build.<anonymous closure>
package:sticky_grouped_list/sticky_grouped_list.dart:24

I checked this behavior with native listview.builder but didn't get any such error.

But sticky_group_list causes this exception.

ericel avatar Oct 26 '20 04:10 ericel

I'm facing the same issue, any update on this?

https://user-images.githubusercontent.com/62459896/229017266-2db96a54-e06b-4058-97b1-8419e3b33313.mp4

======== Exception caught by foundation library ==================================================== The following RangeError was thrown while dispatching notifications for ValueNotifier<Iterable<ItemPosition>>: RangeError (index): Invalid value: Not in inclusive range 0..9: 28

When the exception was thrown, this was the stack: #0 List.[] (dart:core-patch/growable_array.dart:264:36) #1 StickyGroupedListViewState._positionListener (package:sticky_grouped_list/src/sticky_grouped_list.dart:321:45) #2 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:381:24) #3 ValueNotifier.value= (package:flutter/src/foundation/change_notifier.dart:495:5) #4 _ScrollablePositionedListState._updatePositions (package:scrollable_positioned_list/src/scrollable_positioned_list.dart:578:49) #5 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:381:24) #6 ValueNotifier.value= (package:flutter/src/foundation/change_notifier.dart:495:5) #7 _PositionedListState._schedulePositionNotificationUpdate. (package:scrollable_positioned_list/src/positioned_list.dart:364:53)

maulik-benzatine avatar Mar 31 '23 03:03 maulik-benzatine

Also running into this issue. A fix would be very much appreciated.

tinkie101 avatar Mar 07 '24 08:03 tinkie101