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
The pagination approach at pub example (Also mentioned by Remi at FlutterVikings before) won't dispose fetchPackagesProvider of a page even if it's out of screen.
i.e: If you scroll down and load second page then scroll to the top, all PackageItem of the second page will be disposed but the corresponding provider fetchPackagesProvider of that page won't be disposed.
The reason is that we're using ref of the main SearchPage widget to fetch a page:
A potential solution is to wrap PackageItem with Consumer but that's not possible with declarative pagination as we need to return null to end the pagination.
The pagination approach at
pub
example (Also mentioned by Remi at FlutterVikings before) won't dispose fetchPackagesProvider of a page even if it's out of screen.i.e: If you scroll down and load second page then scroll to the top, all
PackageItem
of the second page will be disposed but the corresponding providerfetchPackagesProvider
of that page won't be disposed.The reason is that we're using
ref
of the mainSearchPage
widget to fetch a page:riverpod/examples/pub/lib/search.dart
Line 86 in 4dda346
A potential solution is to wrap
PackageItem
with Consumer but that's not possible with declarative pagination as we need to returnnull
to end the pagination.Here's a minimal sample that clarifies the issue:
The text was updated successfully, but these errors were encountered: