registerHandler<C extends Command> static method

void registerHandler<C extends Command>(
  1. CommandHandler<Command, dynamic> handler
)

The method to register a new handler for a command. The handler will be stored in the map with the command type as the key.

Implementation

static void registerHandler<C extends Command>(CommandHandler handler) {
  _handlers[C] = handler;
}