postcondition method

  1. @override
Future<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
Future<bool> postcondition(
  CommandContext<State, System> context,
  State state,
  dynamic result,
) {
  return asyncCallOr(
    () => _postcondition?.call(
      state,
      context.currentValue as T,
      result as R,
    ),
    true,
  );
}