Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception during loading more items #28

Open
emvaized opened this issue Apr 8, 2021 · 3 comments
Open

Exception during loading more items #28

emvaized opened this issue Apr 8, 2021 · 3 comments

Comments

@emvaized
Copy link

emvaized commented Apr 8, 2021

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>
@kanari3
Copy link

kanari3 commented Oct 14, 2021

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

@huucl
Copy link

huucl commented Feb 23, 2023

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

@kanari3
Copy link

kanari3 commented Feb 23, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants