Command constructor
Command({})
Implementation
Command({
required this.cmd,
this.requestId,
this.timestamp,
this.requireAuth,
this.errorCode,
this.errorMessage,
this.replyToChannel = false,
this.payload = const {},
}) {
if (payload.isNotEmpty) {
requestId ??= Uuid().v1();
payload['req_id'] = requestId;
replyToChannel = payload['reply_to_channel'] ?? replyToChannel;
payload.removeWhere((key, value) => value == null);
}
}