Open ipg0 opened 6 months ago
Yes, if you clear the cache, you'll need to manually execute the requests to populate it again.
Rebuilding all widgets does nothing here, as a mere rebuild keeps the state. If you really want to go with a solution like this, you will have to throw away the state of all stateful widgets, e.g. like this (though I would recommend a more granular approach, like keeping track of all currently watched graphql queries, and -re-executing them)
I have implemented a global app-wide RefreshIndicator, which should refresh all data, that is fetched from the server by Operaton widgets (auth data and mutations are fetched / executed manually, so they shouldn't be affected).
My solution was to handle the refresh by clearing the Ferry cache (which is a HiveStore) and then rebuilding all children of the global app layout widget.
But, whenever I activate this callback, the active view goes into an endless loading state. If I navigate to a different view and then back, the view reloads as expected.
This is what the RefreshIndicator looks like:
And this is the _rebuildAllChildren function:
flutter doctor
output: