Closed h-unterp closed 2 years ago
Maybe this is not a bug? Riverpod will dispose the provider when it is refreshed. The only issue is how to handle this properly. The example seems to work ok.
Hi @h-unterp sorry for the late reply I unfortunately broken my arms, and now I'm slowly coming back :)
What's the problem here? When you pull to refresh riverpod will refresh entirely your provider so it's normal that your state is empty at that point
enable pull to refresh on custom example, then set a breakpoint: https://github.com/ftognetto/riverpod_infinite_scroll/blob/5d596555f653f201da086a7d775a3607e6df239b/example/lib/custom/custom_example_provider.dart#L63
You will see that all of the members of the state object are null.
You may need to pull to refresh a few times.
However in my app, the state is "erased" after the first pullToRefresh