Skip to content
pubscout

scroll_snap_list

0.9.1, released 4 years ago by msvcode.com

A Flutter wrapper for ListView that snaps to items at the end of user-scroll.

WASM-ready
$ flutter pub add scroll_snap_list
Source repository

What it does

It wraps a ListView.builder to provide a snap-to-item behavior at the end of scrolling. It supports both horizontal and vertical scrolling directions, dynamic item sizing, opacity scaling, and custom positioning anchors.

AI-written summary of version 0.9.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a horizontal or vertical list that snaps to items like a carousel or picker.
  • You want unrestricted scrolling combined with snapping without using rigid page views.
  • You need to trigger callbacks when specific items gain focus during a scroll.

Skip it when

  • You require precise page-by-page snapping like a standard PageView with strict one-item bounds.
  • You are building complex custom physics-based scroll engines from scratch.

Strengths

  • Supports both horizontal and vertical lists with unrestricted scroll behavior.
  • Provides dynamic item size and dynamic opacity scaling features.
  • Works out of the box with standard ListView builders and no external dependencies.

Weaknesses

  • Requires providing a correct itemSize for proper calculation and snapping.
  • Tap detection on child items may conflict if items implement their own custom tap detectors, requiring manual key invocation.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
Expanded(
  child: ScrollSnapList(
    onItemFocus: _onItemFocus,
    itemSize: 35,
    itemBuilder: _buildListItem,
    itemCount: data.length,
    reverse: true,
  ),
)

Alternatives

Packages that do the same job and could replace scroll_snap_list.

  • carousel_slider

    Pick carousel_slider if you specifically need a card carousel with auto-play and pagination indicators rather than a general snap-to-item list wrapper.