Open cornerman opened 4 years ago
Any solution to this yet, it works fine on a StateFulWidget
with FutureBuilder
but crashes with the same error when the Widget
is used in an Overlay
Same as @wizlif, Async is not the problem. When I wrap the component in Hero widget. This problem appears. I use some hack to get it done for me temporarily. My fork here github repo. You should notice that I use null check in all the default PageStore thing . So you should not use this when you need to cache the scroll list position in a router.
Any updates? I encountered the same problem when using Hero animation
This problem still exists. As @wizlif mentions, I'm seeing it when using ScrollablePositionedList
within an overlay.
Anyway, I'm pretty sure this project has been abandoned, but just in case someone else is still using it, I managed to hack around this bug by wrapping the ScrollablePositionedList
in a PageStorage
widget. Something like:
return PageStorage(
bucket: PageStorageBucket(),
child: ScrollablePositionedList(...)
);
This at least stops the crash
I have a
ScrollablePositionedList
in aStreamBuilder
. When the stream triggers, I get an error:Imho,
PageStorage.of(context)
can return null. What can we do about it? Should we just check for null and then use the default (that is already there in casereadState
returns null). Furthermore,writeState
will fail in these cases.