riverpod_pagination 0.1.0
riverpod_pagination: ^0.1.0 copied to clipboard
A simple and effective pagination solution for Flutter apps using Riverpod state management.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.0 - 2024-01-20 #
Added #
- Initial release of riverpod_pagination package
PaginatedState<T>interface for generic pagination state managementDefaultPaginatedState<T>implementation with immutable state handlingPaginatedNotifier<T>base class with built-in pagination logic- Support for multiple pagination strategies:
- Token-based pagination (cursor-based)
- Offset-based pagination (skip/take)
- Page number-based pagination
PaginationConfigfor customizable pagination behaviorPaginationResult<T>and related parameter classesPaginatedListView<T, S>widget for paginated listsPaginatedGridView<T, S>widget for paginated grids- Default Material Design 3 widgets:
DefaultLoadingWidgetDefaultLoadingMoreWidgetDefaultErrorWidgetDefaultEmptyWidgetDefaultShimmerWidget
- Built-in error handling with configurable retry logic
- Automatic scroll detection with customizable threshold
- Pull-to-refresh functionality
- Comprehensive example app with three different pagination strategies
- Full documentation and API reference
Features #
- Generic type support for any data model
- Automatic debouncing for scroll events
- Configurable scroll threshold for load more triggers
- Retry mechanism with exponential backoff
- Customizable loading states and error handling
- Support for both ListView and GridView layouts
- Material Design 3 compliant default widgets
- Performance optimizations for large lists
- Separation of concerns between state management and UI
- Easy integration with existing Riverpod applications