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(MultiKey(room.id, userId).toString());
  if (state == null) return null;
  return Event.fromJson(convertToJson(state), room).asUser;
}