PagedList<T> constructor

PagedList<T>(
  1. List<T> elements,
  2. {bool hasReachedMax = false}
)

Creates paged list.

elements - list of elements, cannot be null or empty, hasReachedMax - flag informing if all elements has already been fetched. True if there are more pages, false otherwise.

Implementation

PagedList(List<T> elements, {this.hasReachedMax = false})
    : assert(
        elements != null && elements.isNotEmpty,
        'Elements cannot be empty',
      ),
      elements = UnmodifiableListView(elements);