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