Skip to content

Glossary: Flutter

ref.invalidate and ref.refresh

Also written: ref.invalidate, ref.refresh

`ref.invalidate(provider)` throws away a provider's value so the next watch fetches again; `ref.refresh(provider.future)` does that and gives back the new `Future`. They power the Try again button and pull to refresh.

Where the book teaches it

Related terms

FutureProviderRefreshIndicator