getUsers method

  1. @override
Future<List<User>> getUsers(
  1. Room room
)
override

Implementation

@override
Future<List<User>> getUsers(Room room) async {
  final users = <User>[];
  for (final key in _roomMembersBox.keys) {
    final statesKey = MultiKey.fromString(key);
    if (statesKey.parts[0] != room.id) continue;
    final state = await _roomMembersBox.get(key);
    users.add(Event.fromJson(convertToJson(state), room).asUser);
  }
  return users;
}