provider library

Classes

ChangeNotifierProvider<T extends ChangeNotifier>
Listens to a ChangeNotifier, expose it to its descendants and rebuilds dependents whenever the ChangeNotifier.notifyListeners is called. [...]
Consumer<T>
Obtain Provider<T> from its ancestors and pass its value to builder. [...]
Consumer2<A, B>
Obtain Provider<T> from its ancestors and pass its value to builder. [...]
Consumer3<A, B, C>
Obtain Provider<T> from its ancestors and pass its value to builder. [...]
Consumer4<A, B, C, D>
Obtain Provider<T> from its ancestors and pass its value to builder. [...]
Consumer5<A, B, C, D, E>
Obtain Provider<T> from its ancestors and pass its value to builder. [...]
Consumer6<A, B, C, D, E, F>
Obtain Provider<T> from its ancestors and pass its value to builder. [...]
ListenableProvider<T extends Listenable>
Listens to a Listenable, expose it to its descendants and rebuilds dependents whenever the listener emits an event. [...]
MultiProvider
A provider that merges multiple providers into a single linear widget tree. It is used to improve readability and reduce boilderplate code of having to nest mutliple layers of providers. [...]
Provider<T>
A Provider that manages the lifecycle of the value it provides by delegating to a pair of ValueBuilder and Disposer. [...]
SingleChildCloneableWidget
A base class for providers so that MultiProvider can regroup them into a linear list.
StreamProvider<T>
Listens to a Stream<T> and exposes T to its descendants. [...]
ValueListenableProvider<T>
Listens to a ValueListenable and expose its current value.

Typedefs

Disposer<T>(BuildContext context, T value) → void
A function that disposes of value.
ErrorBuilder<T>(BuildContext context, Object error) → T
UpdateShouldNotify<T>(T previous, T current) → bool
A function that returns true when the update from previous to current should notify listeners, if any.
ValueBuilder<T>(BuildContext context) → T
A function that creates an object of type T.

Exceptions / Errors

ProviderNotFoundError
The error that will be thrown if Provider.of<T> fails to find a Provider<T> as an ancestor of the BuildContext used.