toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      if (content != null) 'content': content,
      if (counts != null) 'counts': counts?.toJson(),
      'devices': devices.map((i) => i.toJson()).toList(),
      if (eventId != null) 'event_id': eventId,
      if (prio != null) 'prio': prio,
      if (roomAlias != null) 'room_alias': roomAlias,
      if (roomId != null) 'room_id': roomId,
      if (roomName != null) 'room_name': roomName,
      if (sender != null) 'sender': sender,
      if (senderDisplayName != null) 'sender_display_name': senderDisplayName,
      if (type != null) 'type': type,
    };