getCommand static method

Command? getCommand(
  1. Message receivedData
)

Implementation

static Command? getCommand(Message receivedData) {
  if (kDebugMode && isTest) {
    return getCommandSpy;
  } else {
    for (Command command in _commands.values) {
      // if match the command, return that command.
      if (command.command == receivedData.header.command) {
        return command;
      }
    }
    return null;
  }
}