scrollable_positioned_list
0.3.8, released 4 years ago by google.dev
A Flutter list with helper methods to programmatically scroll to an item.
What it does
Provides a list widget that works similarly to ListView.builder but allows programmatic scrolling or jumping to specific items by index. It also helps determine which items are currently visible on the screen.
AI-written summary of version 0.3.8, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to programmatically scroll or jump to a specific item index in a long list.
- You need to track and monitor which items are currently visible in the viewport.
Skip it when
- You only need a standard ListView without programmatic scrolling to arbitrary indices.
Strengths
- Allows smooth scrolling or direct jumping to specific item indices.
- Provides listeners to track visible items on screen.
Weaknesses
- Some newer features like offset listening are currently experimental and subject to bugs.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
final ItemScrollController itemScrollController = ItemScrollController();
final ItemPositionsListener itemPositionsListener = ItemPositionsListener.create();
ScrollablePositionedList.builder(
itemCount: 500,
itemBuilder: (context, index) => Text('Item $index'),
itemScrollController: itemScrollController,
itemPositionsListener: itemPositionsListener,
);Alternatives
Packages that do the same job and could replace scrollable_positioned_list.
- indexed_list_view
Infinite ListView that lets you programmatically jump instantly to any item by index.
82Compare - flutter_slidable
Flutter implementation of slidable list item with directional slide actions and dismissal.
97Compare - infinite_grouped_list
Dynamic scrolling list that efficiently groups items and loads more data as the user scrolls.
79Compare - country_picker
A Flutter widget to pick a country from a list with optional phone code and search.
78Compare
Works with
Packages commonly used together with scrollable_positioned_list: ones it builds on, ones built on it, and its own family.
- flutter_code_editorBuilt on scrollable_positioned_listA customizable code field widget supporting syntax highlighting and code folding.
- kalenderBuilt on scrollable_positioned_listA customizable calendar widget with day, multi-day, month, and schedule views.
- azlistviewBuilt on scrollable_positioned_listA Flutter sticky headers and index ListView with an IndexBar for contact and city lists.
- sticky_grouped_listBuilt on scrollable_positioned_listA scrollable list where items are grouped into sections with sticky headers.
- scrollable_clean_calendarBuilt on scrollable_positioned_listA vertically scrolling calendar widget with locale support and date range selection.
- azlistview_plusBuilt on scrollable_positioned_listA Flutter sticky headers and index ListView with an IndexBar.
- scrollable_list_tab_scrollerBuilt on scrollable_positioned_listSynchronizes a scrollable list of grouped items with corresponding navigation tabs.
- qcf_quran_plusBuilt on scrollable_positioned_listoffline Quran package with Hafs font and have tajweed.