toJson method
Implementation
Map<String, Object?> toJson() {
final accountData = this.accountData;
final ephemeral = this.ephemeral;
final includeLeave = this.includeLeave;
final notRooms = this.notRooms;
final rooms = this.rooms;
final state = this.state;
final timeline = this.timeline;
return {
if (accountData != null) 'account_data': accountData.toJson(),
if (ephemeral != null) 'ephemeral': ephemeral.toJson(),
if (includeLeave != null) 'include_leave': includeLeave,
if (notRooms != null) 'not_rooms': notRooms.map((v) => v).toList(),
if (rooms != null) 'rooms': rooms.map((v) => v).toList(),
if (state != null) 'state': state.toJson(),
if (timeline != null) 'timeline': timeline.toJson(),
};
}