toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  final data = <String, Object?>{};
  if (type != null) data['type'] = type;
  if (sender != null) data['sender'] = sender;
  if (content != null) data['content'] = content;
  if (recipient != null) data['recipient'] = recipient;
  if (recipientKeys != null) data['recipient_keys'] = recipientKeys;
  if (keys != null) data['keys'] = keys;
  return data;
}