infinite_grid 1.2.3
infinite_grid: ^1.2.3 copied to clipboard
A high-performance Flutter package for infinite scrolling grids with direct drag control, optional momentum scrolling, and automatic viewport optimization.
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.
1.2.2 #
Fixed #
- pub.dev Compatibility: Fixed README assets display issues
- Replaced GitHub user-attachments URLs with local assets
- Added assets folder with demo images and GIFs
- Fixed image loading on pub.dev package page
- Improved README display across all platforms
1.2.1 #
Added #
- GitHub Actions CI/CD: Automated pull request validation
- Automated code analysis, testing, and formatting checks
- Branch protection rules for code quality
- Repository owner-only merge permissions
Improved #
- Documentation: Enhanced README with status badges and demo sections
- Added pub package, codecov, and style analysis badges
- Updated demo section with side-by-side comparisons
- Better showcase of grid offset and scrolling features
1.2.0 #
Added #
- Grid Offset Feature: Staggered column effects for masonry-style layouts
gridOffsetparameter inGridLayout(0.0 to 1.0, default: 0.0)withGridOffset()method for easy offset updates- Interactive grid offset slider in example app
Changed #
- Staggered Grid Behavior: Odd columns move up, even columns move down
- Maximum shift: quarter cell height per direction (total max: half cell height)
- Creates balanced and visually appealing staggered effect
Fixed #
- Item Centering: Fixed positioning issues when grid offset is applied
jumpToItem()andanimateToItem()now correctly center itemsgetCurrentCenterItemIndex()accounts for staggered column offsets- Proper coordinate system compensation for visual center
Improved #
- Code Architecture: Centralized grid calculations in controller
- Single source of truth for all offset and position calculations
- Widget delegates to controller:
_controller.calculateColumnOffset(x) - Cleaner separation of concerns and better maintainability
- API Design: Enhanced method signatures with named parameters
- Improved readability for methods with multiple arguments
- Self-documenting method calls eliminate parameter confusion
First public release on pub.dev.
Note: Earlier versions were not published to pub.dev. This release includes all features and improvements listed below.
1.1.1 #
- Added a demo section to the README.
1.1.0 #
Added #
- NEW: Support for rectangular cells with
GridLayout.rectangular()constructor - NEW:
cellWidthandcellHeightproperties inGridCellConfigfor rectangular cells - NEW:
effectiveCellWidthandeffectiveCellHeightproperties inGridLayout - NEW: Helper methods for rectangular cells:
withCellDimensions()andwithRectangularConfiguration() - NEW:
GridCellConfig.rectangular()constructor for rectangular cell configurations
Changed #
- BREAKING:
InfiniteGridnow requires aList<T> itemsparameter - no more optional items - BREAKING:
cellBuilderfunction signature changed to(GridCellConfig config, T item)- item is now required and non-nullable - BREAKING: Removed
InfiniteGrid.builder()constructor - use the main constructor instead - BREAKING: Made
InfiniteGridclass generic (InfiniteGrid<T>) to provide type safety for items - BREAKING: All grids now cycle through items infinitely - no more dual-mode behavior
- Improved API consistency by having a single constructor that always works with items
- Enhanced type safety by requiring items and providing strongly-typed access in cellBuilder
- BREAKING: Removed deprecated
cellSizeandeffectiveCellSizeproperties fromGridLayout - BREAKING: Removed deprecated
cellSizeproperty fromGridCellConfig
Note: Earlier versions were not published to pub.dev. This release includes all features and improvements listed below.
Added #
- Support for rectangular cells with
GridLayout.rectangular()constructor cellWidthandcellHeightproperties inGridCellConfigfor rectangular cellseffectiveCellWidthandeffectiveCellHeightproperties inGridLayout- Helper methods for rectangular cells:
withCellDimensions()andwithRectangularConfiguration() GridCellConfig.rectangular()constructor for rectangular cell configurations- Core
InfiniteGridwidget with high-performance rendering InfiniteGridControllerfor programmatic controlInfiniteGridController.fromItem()factory constructor for starting at specific items- Custom momentum scrolling with
GridPhysics - Configurable cell spacing with
spacingparameter - Configurable cell preloading with
preloadCellsparameter - Ring-based spiral indexing for grid cells starting from center (0,0)
- Centered grid layout with origin (0,0) positioned at viewport center
- Support for iOS, Android, Web, and Desktop platforms
- Comprehensive test suite
- Example app demonstrating various use cases
Changed #
InfiniteGridnow requires aList<T> itemsparameter - no more optional itemscellBuilderfunction signature changed to(GridCellConfig config, T item)- item is now required and non-nullable- Made
InfiniteGridclass generic (InfiniteGrid<T>) to provide type safety for items - All grids now cycle through items infinitely - no more dual-mode behavior
- Improved API consistency by having a single constructor that always works with items
- Enhanced type safety by requiring items and providing strongly-typed access in cellBuilder
- Removed deprecated `