toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  final data = <String, Object?>{};
  if (join != null) {
    data['join'] = join!.map((k, v) => MapEntry(k, v.toJson()));
  }
  if (invite != null) {
    data['invite'] = invite!.map((k, v) => MapEntry(k, v.toJson()));
  }
  if (leave != null) {
    data['leave'] = leave!.map((k, v) => MapEntry(k, v.toJson()));
  }
  return data;
}