infinite_grouped_list 1.3.0 copy "infinite_grouped_list: ^1.3.0" to clipboard
infinite_grouped_list: ^1.3.0 copied to clipboard

Dynamic scrolling list in Flutter, efficiently grouping items and seamlessly loading more data as user scrolls

1.3.0 πŸš€ Reactive State Management Support #

Major Features

  • ✨ NEW: InfiniteGroupedList.reactive() constructor for reactive state management patterns
  • ✨ NEW: InfiniteGroupedList.reactiveGrid() constructor for grid layouts with reactive patterns
  • πŸ”Œ Full BLoC/Provider/Riverpod Integration: Clean separation between event triggering and data listening
  • 🎯 Event-Driven Architecture: onLoadMoreTriggered callback decouples data fetching from UI events
  • πŸ“‘ External State Support: Accepts items, isLoading, hasReachedMax, and error from external state management

API Enhancements

  • πŸŽ›οΈ Smart Controller Behavior: Controller methods automatically adapt to reactive vs imperative mode
  • 🚫 Safety Guards: Controller throws helpful errors when using imperative methods in reactive mode
  • πŸ”„ Reactive Lifecycle: Automatic updates when external state changes via didUpdateWidget
  • ⚑ Performance Optimized: Efficient reactive data handling without unnecessary rebuilds

Example Project Improvements

  • πŸ“± Comprehensive BLoC Example: Full-featured reactive example with mock API, error handling, and loading states
  • 🧭 Enhanced Navigation: Example selection screen with beautiful cards and proper navigation
  • 🎨 Rich UI Components: Category-based grouping with colored icons, sticky headers, and animations
  • πŸ”„ Refresh Patterns: Demonstrates both pull-to-refresh and manual refresh in reactive mode

Developer Experience

  • πŸ“š Pattern Comparison: Side-by-side examples of imperative vs reactive patterns
  • πŸ—οΈ Clean Architecture: Examples follow modern Flutter architecture best practices
  • 🎯 Real-world Simulation: Mock network calls, pagination limits, and error scenarios
  • πŸ’‘ Clear Documentation: Comprehensive inline examples and usage patterns

Breaking Changes

  • None! Fully backward compatible with existing imperative usage

1.2.11 ⬆️ Upgrade dependencies #

  • Upgraded dependencies to the latest versions

1.2.10 #

  • ✨ Added scrollController to all constructors, you can now pass your own scroll controller

1.2.9 #

Performance Improvements

  • ⚑ Optimized group operations with targeted updates instead of full regrouping
  • 🧠 Reduced memory usage by avoiding unnecessary data structure recreation
  • πŸš€ Implemented efficient item addition with selective group updates
  • πŸ—‘οΈ Optimized item removal with targeted group processing

Bug Fixes

  • πŸ” Fixed potential memory leaks by properly clearing controller callbacks
  • 🎯 Improved scroll performance for large datasets
  • πŸ”„ Enhanced refresh operation efficiency

API Improvements

  • ✨ Added helper methods for group management (_sortSingleGroup, _addItemsToGroups, _createInitialGroups)
  • πŸ“Š Better handling of empty groups after item removal

1.2.8 πŸ› Bug fixes #

  • Fixes hashValues deprecated issues

1.2.7 ✨ New Features #

  • Adds addItems method in InfiniteGroupedListController
  • Adds removeWhere method in InfiniteGroupedListController
  • Hides internal methods in InfiniteGroupedListController

1.2.6 ✨ New Features #

  • Adds a new limit parameter in InfiniteGroupedListController to tell the library how much items are expected from the remote call
  • Adds a callback onNoMoreItemsFound that is triggered when the response returns less items than the provided limit

1.2.5 ♻️ Refactoring #

  • Refactors InfiniteGroupedListController to avoid LateInitializationErrors

1.2.4 πŸ› Bug fixes #

  • Adds missing showRefreshIndicator from default constructor

1.2.3 ✨ New Features #

  • Adds showRefreshIndicator flag which defaults to true

1.2.2 ✨ New Features #

  • Adds missing Key

1.2.1 ✨ New Features #

  • Adds remove(ItemType) method to the controller. You can now programmatically remove items from the list.

1.2.0 πŸ’₯ Breaking changes #

  • Tweaks initialItemsErrorWidget & loadMoreItemsErrorWidget parameters. They are now function that returns a Widget, exposing the error aswell :
        initialItemsErrorWidget: (error) => GestureDetector(
          child: Text(
            error.toString(),
            textAlign: TextAlign.center,
            style: const TextStyle(
              fontSize: 15,
              fontWeight: FontWeight.w500,
              decoration: TextDecoration.underline,
              decorationColor: Colors.blue,
              color: Colors.blue,
            ),
          ),
        ),
        loadMoreItemsErrorWidget: (error) => GestureDetector(
          child: Text(
            error.toString(),
            textAlign: TextAlign.center,
            style: const TextStyle(
              fontSize: 15,
              fontWeight: FontWeight.w500,
              decoration: TextDecoration.underline,
              decorationColor: Colors.blue,
              color: Colors.blue,
            ),
          ),
        ),
  • Adds physics parameter. Defaults to [AlwaysScrollablePhysics]

1.1.2 #

  • Initializes getItems with default empty List to avoid LateInitializationError
  • Internal code refactoring

1.1.1 #

  • Internal code refactoring

1.1.0 ✨ New Features - Simplifies & Improves API #

  • Adds new builder InfiniteGroupedList.gridView. Define your gridDelegate and customise it as you want.
  • Fields made optional:
    • seperatorBuilder
    • sortGroupBy
  • Removes the padding that was not removed on previous version.

1.0.1 πŸ› Bug fixes & API improvements #

  • Removes padding parameter as it does not correspond to anything
  • Adds isPaged parameter. If the onLoadMore is not paged, everytime the same items will be added to the list when the list reaches at the bottom. Therefore, we should set the isPaged to false and after the initial fetch it will stop fetching the items. It defaults to true
  • Checks if mounted before setting state

1.0.0 πŸŽ‰ Initial release #

  • Initial release
49
likes
150
points
2.57k
downloads
screenshot

Publisher

verified publisheresentis.dev

Weekly Downloads

Dynamic scrolling list in Flutter, efficiently grouping items and seamlessly loading more data as user scrolls

Repository (GitHub)
View/report issues

Topics

#infinite-list #grouped-list #infinite-grouped-list #widget

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, flutter_sticky_header, lint, test

More

Packages that depend on infinite_grouped_list