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. Map<String, BasicEvent>? roomAccountData,
  8. RoomSummary? summary,
  9. Event? lastEvent,
  10. LatestReceiptState? receiptState,
})

Implementation

Room({
  required this.id,
  this.membership = Membership.join,
  this.notificationCount = 0,
  this.highlightCount = 0,
  this.prev_batch,
  required this.client,
  Map<String, BasicEvent>? roomAccountData,
  RoomSummary? summary,
  this.lastEvent,
  LatestReceiptState? receiptState,
}) : roomAccountData = roomAccountData ?? <String, BasicEvent>{},
     summary = summary ?? RoomSummary.fromJson({}),
     receiptState = receiptState ?? LatestReceiptState.empty();