execute method

void execute({
  1. required UndoableCommand<State> command,
  2. required State state,
})

Executes command, records it for undo/redo, and applies it to state.

Implementation

void execute({
  required UndoableCommand<State> command,
  required State state,
}) {
  command.apply(state);
  _appendCommand(command);
}