accessor<R> abstract method

StateAccessor<R> accessor<R>(
  1. BaseWatchable<BaseNotifier, dynamic, R> provider
)

Similar to Ref.read, but instead of returning the state right away, it returns a StateAccessor to get the state later.

This is useful if you need to use the latest state of a provider, but you can't use Ref.watch when building a notifier.

Implementation

StateAccessor<R> accessor<R>(
  BaseWatchable<BaseNotifier, dynamic, R> provider,
);