listen<T> method
void
listen<T>(
- ProviderListenable<
T> provider, - void listener(
- T? previous,
- T value
- void onError(
- Object error,
- StackTrace stackTrace
- bool fireImmediately = false,
Listens to a provider and automatically manages the subscription
Implementation
void listen<T>(
ProviderListenable<T> provider,
void Function(T? previous, T value) listener, {
void Function(Object error, StackTrace stackTrace)? onError,
bool fireImmediately = false,
}) {
InheritedConsumer.listen<T>(this, provider, listener,
onError: onError, fireImmediately: fireImmediately);
}