PaginationProvider<T> class sealed

Unified pagination data provider that can be either Future-based or Stream-based.

Use PaginationProvider.future for standard REST API pagination. Use PaginationProvider.stream for real-time updates.

Example with Future:

final provider = PaginationProvider<Product>.future(
  (request) => apiService.fetchProducts(request),
);

Example with Stream:

final provider = PaginationProvider<Product>.stream(
  (request) => apiService.productsStream(request),
);
Implementers

Constructors

PaginationProvider.future(Future<List<T>> dataProvider(PaginationRequest request))
Creates a Future-based pagination provider for standard REST APIs.
const
factory
PaginationProvider.mergeStreams(List<Stream<List<T>>> streamsProvider(PaginationRequest request))
Creates a provider that merges multiple streams into a single stream.
factory
PaginationProvider.stream(Stream<List<T>> streamProvider(PaginationRequest request))
Creates a Stream-based pagination provider for real-time updates.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited