flutter_listview_loadmore icon indicating copy to clipboard operation
flutter_listview_loadmore copied to clipboard

Exception during loading more items

Open emvaized opened this issue 4 years ago • 3 comments

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 avatar Apr 08 '21 19:04 emvaized

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

kanari3 avatar Oct 14 '21 19:10 kanari3

Faced the same issue, @kanari3 @emvaized how about your status

huucl avatar Feb 23 '23 09:02 huucl

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

kanari3 avatar Feb 23 '23 10:02 kanari3