GetRoomEventsResponse.fromJson constructor

GetRoomEventsResponse.fromJson(
  1. Map<String, Object?> json
)

Implementation

GetRoomEventsResponse.fromJson(Map<String, Object?> json)
    : chunk = (json['chunk'] as List)
          .map((v) => MatrixEvent.fromJson(v as Map<String, Object?>))
          .toList(),
      end = ((v) => v != null ? v as String : null)(json['end']),
      start = json['start'] as String,
      state = ((v) => v != null
          ? (v as List)
              .map((v) => MatrixEvent.fromJson(v as Map<String, Object?>))
              .toList()
          : null)(json['state']);