notifier property
Refreshable<NotifierT>
get
notifier
Obtains the ChangeNotifier
associated with this provider, without listening
to state changes.
This is typically used to invoke methods on a ChangeNotifier
. For example:
Button(
onTap: () => ref.read(changeNotifierProvider.notifier).increment(),
)
This listenable will notify its notifiers if the ChangeNotifier
instance
changes.
This may happen if the provider is refreshed or one of its dependencies
has changes.
Implementation
Refreshable<NotifierT> get notifier => ProviderElementProxy<NotifierT, NotifierT>(this, (element) {
return (element as _ChangeNotifierProviderElement<NotifierT>)._notifierNotifier;
});