listen<T> abstract method
void
listen<T>(
- ProviderListenable<
T> provider, - void listener(
- T? previous,
- T next
- void onError(
- Object error,
- StackTrace stackTrace
Listen to a provider and call listener
whenever its value changes.
This is useful for showing modals or other imperative logic.
Implementation
void listen<T>(
ProviderListenable<T> provider,
void Function(T? previous, T next) listener, {
void Function(Object error, StackTrace stackTrace)? onError,
});