internalWrapReduce method

  1. @override
  2. @internal
  3. @nonVirtual
(T, WatchActionSubscription) internalWrapReduce()

Implementation

@override
@internal
@nonVirtual
(T, WatchActionSubscription) internalWrapReduce() {
  final notifierDependencies = {..._notifier.dependencies};
  _rebuildController.stream.listen((event) {
    _reduceWithDependencyCheck(
      notifierDependencies: notifierDependencies,
      dispatchNewAction: true,
    );
  });
  final subscription = WatchActionSubscription(this);
  notifier.registerWatchAction(subscription);
  return (
    _reduceWithDependencyCheck(
      notifierDependencies: notifierDependencies,
      dispatchNewAction: false,
    ),
    subscription
  );
}