ResultRoomEvents.fromJson constructor
Implementation
ResultRoomEvents.fromJson(Map<String, Object?> json)
: count = ((v) => v != null ? v as int : null)(json['count']),
groups = ((v) => v != null
? (v as Map<String, Object?>).map(
(k, v) => MapEntry(
k,
(v as Map<String, Object?>).map(
(k, v) => MapEntry(
k,
GroupValue.fromJson(v as Map<String, Object?>),
),
),
),
)
: null)(json['groups']),
highlights = ((v) => v != null
? (v as List).map((v) => v as String).toList()
: null)(json['highlights']),
nextBatch = ((v) => v != null ? v as String : null)(json['next_batch']),
results = ((v) => v != null
? (v as List)
.map((v) => Result.fromJson(v as Map<String, Object?>))
.toList()
: null)(json['results']),
state = ((v) => v != null
? (v as Map<String, Object?>).map(
(k, v) => MapEntry(
k,
(v as List)
.map(
(v) => MatrixEvent.fromJson(v as Map<String, Object?>),
)
.toList(),
),
)
: null)(json['state']);