Open iamevaristus opened 1 year ago
Have the same error stack in Crashlytics:
Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Bad state: No element. Error thrown while dispatching notifications for ValueNotifier<Iterable<ItemPosition>>.
at Iterable.reduce(dart:core)
at StickyGroupedListViewState._positionListener(sticky_grouped_list.dart:316)
at ChangeNotifier.notifyListeners(change_notifier.dart:403)
at ValueNotifier.value=(change_notifier.dart:530)
at _ScrollablePositionedListState._updatePositions(scrollable_positioned_list.dart:653)
at ChangeNotifier.notifyListeners(change_notifier.dart:403)
at ValueNotifier.value=(change_notifier.dart:530)
at _PositionedListState._schedulePositionNotificationUpdate.<fn>(positioned_list.dart:365)
at SchedulerBinding._invokeFrameCallback(binding.dart:1297)
at SchedulerBinding.handleDrawFrame(binding.dart:1236)
at SchedulerBinding._handleDrawFrame(binding.dart:1085)
Did you guys found any fix or know whats wrong?
Same issue, has anyone found a fix? This happens for me when I use a filter and the result from the database is empty. This seems to only happen after the widget is loaded so if the list is empty on first load, it works fine. Hoping there is a solution, otherwise I sadly have to remove from the app. Thanks.
I added PR from another PR #53 that I saw but it had merge issues. This seems to fix the issue locally. If either can be merged soon, that would be great, thanks!
will there be fix soon?
my workaround is this -> it works without triggering the error and if you have RefreshIndicator above, it will work aswell:
elements.isNotEmpty ? StickyGroupedListView<T, DateTime>(
.......
) : ListView(
physics: AlwaysScrollableScrollPhysics(),
)
I was using the GroupedListView but then decided to switch over to the Sticky one. Then, I started getting errors. When the message is loaded, I get this error:
I already but a check on whether the messageList is empty or not, and I am sure of what am saying. Whenever the message is fully loaded, I get the "Bad State, No element" error.
The Sticky Widget:
Where it is passed:
I need a fast fix