filterUsers method

  1. @override
Future<PaginatedListUser?> filterUsers(
  1. Filter<User> filter, {
  2. String? nextUserId,
  3. int? limit,
})
override

Load users from the database by filtering them using the provided Filter.

Filters are complex selectors that are built by combining basic building blocks. Examples of filters available for Users are AllUsersFilter and UsersByIdsFilter. This method returns a paginated list of users (with a cursor that lets you query the following items).

Parameters:

  • Filter filter (required): The Filter object that describes which condition(s) the elements whose the ids should be returned must fulfill

  • String nextUserId: The id of the first User in the next page

  • int limit: The number of users to return in the queried page

Implementation

@override
Future<PaginatedListUser?> filterUsers(
    Filter<User> filter, {
      String? nextUserId,
      int? limit,
    }) async {
  return (await api.baseUserApi
      .filterUsersBy(base_api.FilterChain<base_api.UserDto>(filter.toAbstractFilterDto()), startDocumentId: nextUserId, limit: limit))
      ?.toPaginatedListUser();
}