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),
);
Constructors
-
PaginationProvider.future(Future<
List< dataProvider(PaginationRequest request))T> > -
Creates a Future-based pagination provider for standard REST APIs.
constfactory
-
PaginationProvider.mergeStreams(List<
Stream< streamsProvider(PaginationRequest request))List< >T> > -
Creates a provider that merges multiple streams into a single stream.
factory
-
PaginationProvider.stream(Stream<
List< streamProvider(PaginationRequest request))T> > -
Creates a Stream-based pagination provider for real-time updates.
constfactory
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