toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  final content = this.content;
  final override = this.override;
  final room = this.room;
  final sender = this.sender;
  final underride = this.underride;
  return {
    if (content != null) 'content': content.map((v) => v.toJson()).toList(),
    if (override != null)
      'override': override.map((v) => v.toJson()).toList(),
    if (room != null) 'room': room.map((v) => v.toJson()).toList(),
    if (sender != null) 'sender': sender.map((v) => v.toJson()).toList(),
    if (underride != null)
      'underride': underride.map((v) => v.toJson()).toList(),
  };
}