flutter_listview_loadmore
flutter_listview_loadmore copied to clipboard
Exception during loading more items
Console output:
E/flutter ( 7904): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: This widget has been unmounted, so the State no longer has a context (and should be considered defunct).
E/flutter ( 7904): Consider canceling any active work during "dispose" or using the "mounted" getter to determine if the State is still active.
E/flutter ( 7904): #0 State.context.<anonymous closure> (package:flutter/src/widgets/framework.dart:910:9)
E/flutter ( 7904): #1 State.context (package:flutter/src/widgets/framework.dart:916:6)
E/flutter ( 7904): #2 DefaultLoadMoreViewState.notify (package:loadmore/src/loadmore_widget.dart:336:31)
E/flutter ( 7904): <asynchronous suspension>
@emvaized Hi, I ran into that problem too! It happened when I set whenEmptyLoad to true.
The conditions are as follows
- iOS only (especially noticeable in Simulator)
- It doesn't happen every time.
Wouldn't setting whenEmptyLoad to false solve the problem? However, in that case, LoadMoreDelegate will not be called the first time.
Faced the same issue, @kanari3 @emvaized how about your status
@huucl I have run into problems in the past and have already found ways to solve them then.
- Use whenEmptyLoad with false
- Examine the processing in onLoadMore
flutter_listview_loadmore is a good library and I still use it.