riverpod_swiss_knife library

A Swiss Army knife for Riverpod.

Classes

AsAsync<T>
lifts a sync provider's value into AsyncValue<T>, initialized with AsyncData of the current value or AsyncError if errored.
Where<T>
filters state notifications from an async provider, using a predicate on the unwrapped value.

Mixins

UpdateNotifierMixin<T>
A mixin that adds an update method, meant to be used on Notifier

Extensions

AddDisposeDelayRef on Ref
Extension on Ref to add a dispose delay.
AsAsyncAsyncProviderListenableExtension on ProviderListenable<AsyncValue<T>>
identity variant — async sources are already AsyncValue, so asAsync is a transparent pass-through for uniform call-site ergonomics.
AsAsyncProviderListenableExtension on ProviderListenable<T>
extension on ProviderListenable to lift sync state into AsyncValue.
CacheRef on Ref
Extension on Ref to cache the provider for a specific duration.
DebounceForRef on Ref
Extension on Ref to debounce the provider for a specific duration.
InvalidatePeriodicallyRef on Ref
Extension on Ref to periodically invalidate a provider.
RefInvalidateSelfAfter on Ref
Extension on Ref to invalidate itself after a specific duration.
RefOnRepeat on Ref
Extension on Ref to do something repeatedly at a specific interval.
RefRun on Ref
Extension on Ref to run an asynchronous provider, and get its value.
RefTimeout on Ref
Extension on Ref to do something after a specific duration.
WhereProviderListenableExtension on ProviderListenable<AsyncValue<T>>
extension on async ProviderListenable to filter state notifications.

Exceptions / Errors

RiverpodCancelException
thrown when an operation is canceled: should be quite low in your logs level, and should be ignored in your business logic