postcondition method

  1. @override
bool postcondition(
  1. CommandContext<State, System> context,
  2. State state,
  3. dynamic result
)
override

Returns true if postcondition of the command is satisfied.

Implementation

@override
bool postcondition(
  CommandContext<State, System> context,
  State state,
  dynamic result,
) {
  return _postcondition?.call(
        state,
        context.currentValue as T,
        result as R,
      ) ??
      true;
}