listen<N extends StateNotifier<S>, S> abstract method

N listen<N extends StateNotifier<S>, S>(
  1. BaseStateNotifierProvider<N, S> providerOrFilter, {
  2. required void callback(
    1. N notifier
    ),
  3. String? tag,
})

A function to read SimpleProvider or a StateProvider and subscribe to the events.

this method returns the Notifier linked to the provider

Implementation

N listen<N extends StateNotifier<S>, S>(
  m.BaseStateNotifierProvider<N, S> providerOrFilter, {
  required void Function(N notifier) callback,
  String? tag,
});