seedRoomMeta method

void seedRoomMeta(
  1. String roomId, {
  2. int? unread,
  3. bool? pinned,
  4. bool? muted,
})

Test/demo helper: seed chat-list metadata (unread badge, pinned, muted) that the real backend computes/stores but the mock ChatRoom model doesn't carry. Null args leave the current value untouched.

Implementation

void seedRoomMeta(String roomId, {int? unread, bool? pinned, bool? muted}) {
  if (unread != null) _unread[roomId] = unread;
  if (pinned != null) _pinned[roomId] = pinned;
  if (muted != null) _muted[roomId] = muted;
}