LeftRoomUpdate.fromJson constructor

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

Implementation

LeftRoomUpdate.fromJson(Map<String, Object?> json)
    : state = json
          .tryGetMap<String, List<Object?>>('state')?['events']
          ?.map((i) => SDNEvent.fromJson(i as Map<String, Object?>))
          .toList(),
      timeline = json.tryGetFromJson('timeline', TimelineUpdate.fromJson),
      accountData = json
          .tryGetMap<String, List<Object?>>('account_data')?['events']
          ?.map((i) => BasicRoomEvent.fromJson(i as Map<String, Object?>))
          .toList();