You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
running into an issue where I have a listView of swipers, they are appropriately unmounted as they go out of scrollview, however if I reverse scroll back (with a previous swiper coming back into view), I occasionally get the following error:
"This widget has been unmounted, so the State no longer has a context (and should be considered defunct)."
it looks like it is triggered when the TransformerPageView tries to get the renderObject from the context (below), but not sure why it's being called after it's unmounted? possibly a timing issue? open to any suggestions. -- thanks!
void _onGetSize(_) {
Size? size;
// if (context == null) {
// onGetSize(size);
// return;
// }
final renderObject = context.findRenderObject();
if (renderObject != null) {
final bounds = renderObject.paintBounds;
size = bounds.size;
}
_calcCurrentPixels();
onGetSize(size);
}
update: I notice that there is no "if (mounted)" check before the context.findRenderObject() is called, and also am curious why the context == null check has been commented out?
The text was updated successfully, but these errors were encountered:
checked on latest v2.0.1, still an issue. I'm ok with simply commenting back in the null check for the context, but I'd be a little concerned since it was purposely commented out as some point, so not sure of the repercussions?
I was using a CustomScrollView so instead of using SliverToBoxAdapter i shifted to SliverPersistentHeader and then issue was gone.
I hope it helps others as well
observed with card_swiper v1.0.4
running into an issue where I have a listView of swipers, they are appropriately unmounted as they go out of scrollview, however if I reverse scroll back (with a previous swiper coming back into view), I occasionally get the following error:
"This widget has been unmounted, so the State no longer has a context (and should be considered defunct)."
it looks like it is triggered when the TransformerPageView tries to get the renderObject from the context (below), but not sure why it's being called after it's unmounted? possibly a timing issue? open to any suggestions. -- thanks!
update: I notice that there is no "if (mounted)" check before the context.findRenderObject() is called, and also am curious why the context == null check has been commented out?
The text was updated successfully, but these errors were encountered: