Room constructor

Room({
  1. required String id,
  2. Membership membership = Membership.join,
  3. int notificationCount = 0,
  4. int highlightCount = 0,
  5. String? prev_batch,
  6. required Client client,
  7. String? notificationSettings,
  8. Map<String, BasicRoomEvent>? roomAccountData,
  9. RoomSummary? summary,
})

Implementation

Room({
  required this.id,
  this.membership = Membership.join,
  this.notificationCount = 0,
  this.highlightCount = 0,
  this.prev_batch,
  required this.client,
  this.notificationSettings,
  Map<String, BasicRoomEvent>? roomAccountData,
  RoomSummary? summary,
})  : roomAccountData = roomAccountData ?? <String, BasicRoomEvent>{},
      summary = summary ??
          RoomSummary.fromJson({
            'm.joined_member_count': 0,
            'm.invited_member_count': 0,
            'm.heroes': [],
          });