handle abstract method

FutureOr<R?> handle(
  1. C command,
  2. R? previousState
)

The method to handle the command and update the state. It will receive the command and the previous state as arguments and should return the new state. This method is called by the Mediator to handle the command.

Implementation

FutureOr<R?> handle(C command, R? previousState);