ProviderCache<T> extension
Adds caching functionality to Ref<T> objects.
Keeps Ref<T> objects, typically Riverpod providers, alive
for a specified duration, preventing them from being disposed immediately
after they're no longer listened to.
See cacheFor
- on
-
- Ref<
T>
- Ref<
Methods
-
cacheFor(
Duration duration) → void -
Available on Ref<
Keeps the surrounding provider alive forT> , provided by the ProviderCache extensionduration.