flutter_magnetic_scroll 0.3.0
flutter_magnetic_scroll: ^0.3.0 copied to clipboard
A Flutter custom ScrollPhysics package for TikTok/Reels style feeds and pickers. Features magnetic snapping to fixed or variable item boundaries with physics-based smoothness.
0.3.0 #
- Enforce configured item extents in
MagneticScrollView. - Add automatic edge padding for correct first/last center and end alignment.
- Keep start-aligned lists flush at their natural trailing extent.
- Rebuild internal controller state when sizing configuration changes.
- Validate sizing configuration and numeric physics options.
- Bound physics targets with
itemCount. - Add bounded, lazy binary-search lookup and
itemSizeCacheVersioninvalidation for variable sizes.
0.2.1 #
- Add
maxFlingItemsto cap the maximum number of items that can be skipped per swipe. - Calibrate
flingFrictionto prevent unintended runaway scrolling to the ends of lists.
0.2.0 #
- Add
MagneticScrollViewwrapper widget for an out-of-the-box simplified API. - Add
MagneticSnapAlignment(start, center, end) to support horizontal carousels and custom pickers. - Add
itemSizeBuilderto support infinite, dynamically sized feeds without lag using a smart cache.
0.1.0 #
- Initial release.
- Add support for variable item sizes using
itemSizes. - Introduce
MagneticScrollControllerfor programmatic navigation (animateToItem,jumpToItem) and focus tracking. - Add
onItemFocusedcallback toMagneticScrollPhysicsto handle early snap prediction. - Add
strictSingleItemSnappingrule to enforce one-item-per-swipe behavior (useful for TikTok/Reels clones).