EdsonBueno / infinite_scroll_pagination

Flutter package to help you lazily load and display pages of items as the user scrolls down your screen.
https://pub.dev/packages/infinite_scroll_pagination
MIT License
623 stars 210 forks source link

The previous widgets are disposed when new widgets are added to PagingController #215

Closed vovaklh closed 6 months ago

vovaklh commented 2 years ago

All widgets in my PagedGridView are disposed when new widgets are added. Is it possible to keep state of this widgets?

clragon commented 1 year ago

The way ScrollViews work is by building and discarding children. Your widgets therefore cannot be kept alive. You should hoist any State that they might have above your ScrollView if it has to persist for a longer duration.