state property

Obtains the StateNotifier and also listens to the state, as opposed to notifier which will not listen to the state.

Implementation

@override
late final AlwaysAliveProviderBase<StateController<State>> state =
    _NotifierStateProvider(
  (ref) {
    return _listenStateProvider(
      ref as ProviderElementBase<StateController<State>>,
      ref.watch(notifier),
    );
  },
  dependencies: [notifier],
  from: from,
  argument: argument,
);