createReaction method

  1. @visibleForTesting
Reaction createReaction(
  1. dynamic onInvalidate(), {
  2. dynamic onError(
    1. Object,
    2. Reaction
    )?,
})

A convenience method used for testing.

Implementation

@visibleForTesting
Reaction createReaction(
  Function() onInvalidate, {
  Function(Object, Reaction)? onError,
}) =>
    ReactionImpl(
      getContext(),
      onInvalidate,
      name: getName(),
      onError: onError,
    );