getUser method

  1. @override
Future<User?> getUser(
  1. String userId,
  2. Room room
)
override

Implementation

@override
Future<User?> getUser(String userId, Room room) async {
  final state =
      await _roomMembersBox.get(TupleKey(room.id, userId).toString());
  if (state == null) return null;
  return Event.fromJson(copyMap(state), room).asUser;
}