send method

Stream send(
  1. dynamic command
)

Implementation

Stream send(dynamic command) {
  var type = command.runtimeType;
  var handler = commandHandlers[type];
  if (handler == null) {
    throw "No command handler for type: $type";
  }
  // set runtime if it is a command
  if (command is Command) {
    command.runtime = this;
  }
  return handler(command);
}