parseMessageFromCommand function

BaseMessage? parseMessageFromCommand(
  1. Command? command
)

Implementation

BaseMessage? parseMessageFromCommand(Command? command) {
  if (command == null) return null;
  final payload = command.payload;
  return BaseMessage.msgFromJson(payload, type: command.cmd);
}