accessor<R> method
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
@override
StateAccessor<R> accessor<R>(
BaseWatchable<BaseNotifier, dynamic, R> provider,
) {
_getState(provider.provider); // ensure initialized
return StateAccessor<R>(
ref: this,
provider: provider,
);
}