Package 

Interface UserListState


  • 
    public interface UserListState
    
                        

    An observable state object that manages the users list.

    UserListState provides a reactive interface for observing changes to the users list, including pagination state. It automatically handles sorting and merging users as more pages are loaded.

    Example usage:

    val userList = client.userList(query)
    userList.state.users.collectLatest { users ->
      // Update UI with new users
    }
    • Method Summary

      Modifier and Type Method Description
      abstract UsersQuery getQuery() The query configuration used for fetching users.
      abstract StateFlow<List<UserData>> getUsers() All the paginated users in the current list.
      abstract Boolean getCanLoadMore() Indicates whether there are more users available to load.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getQuery

         abstract UsersQuery getQuery()

        The query configuration used for fetching users.

        This property contains the filtering, sorting, and pagination parameters that define how users should be fetched and displayed.

      • getUsers

         abstract StateFlow<List<UserData>> getUsers()

        All the paginated users in the current list.

        This property contains all users that have been fetched and merged, maintaining the proper sort order. It automatically updates when new users are loaded.

      • getCanLoadMore

         abstract Boolean getCanLoadMore()

        Indicates whether there are more users available to load.