hexsis_infinity_scroll_bloc 0.2.2
hexsis_infinity_scroll_bloc: ^0.2.2 copied to clipboard
BLoC/Cubit extension for hexsis_infinity_scroll with zero boilerplate and full scroll integration.
0.2.2 #
- FEAT: Update package versions and enhance documentation for reliability and lifecycle management.
- FEAT: Add comprehensive tests for infinite scroll functionality across various implementations.
- FEAT: Add disposal checks to infinite scroll controllers and notifiers to prevent operations after disposal.
- FEAT: Enhance infinite scroll functionality with detailed documentation and improved state management.
0.2.1 #
COMPLETE REWRITE - Now Production-Ready 🎉
Fixed:
- ✅ Scroll detection now works! - Scrolling properly triggers
cubit.loadMore() - ✅ Smart threshold integrated - Uses same logic as core package
- ✅ Proper StatefulWidget - No longer uses broken dummy fetcher approach
- ✅ Pull-to-refresh works - Calls
cubit.refresh()correctly - ✅ Config support added - Can customize threshold, debouncing, etc.
New Widgets:
- ✅ InfiniteScrollBlocListView - Fully functional ListView
- ✅ InfiniteScrollBlocGridView - GridView support
How it works now:
class ProductCubit extends InfiniteScrollCubit<Product> {
@override
Future<List<Product>> fetchPage(int page) async {
return await api.getProducts(page);
}
}
// Widget automatically:
// - Detects scroll threshold
// - Calls cubit.loadMore()
// - Shows loading/error/empty states
// - Handles pull-to-refresh
InfiniteScrollBlocListView<Product, ProductCubit>(
itemBuilder: (context, product, index) => ProductCard(product),
)
Breaking Changes: None (improved existing widgets)
0.2.0 #
- Initial release with base cubit class
- ⚠️ Widgets didn't work properly (fixed in 0.2.1)