This repository was archived by the owner on Oct 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
packages/scrollable_positioned_list Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 0.3.7
2+ * Add ScrollOffsetListener to allow listening to changes in scroll offset.
3+
14# 0.3.6
25* Fix cache extents for horizontal lists
36* scrollTo future doesn't complete until scrolling is done.
Original file line number Diff line number Diff line change @@ -16,12 +16,14 @@ A `ScrollablePositionedList` can be created with:
1616``` dart
1717final ItemScrollController itemScrollController = ItemScrollController();
1818final ItemPositionsListener itemPositionsListener = ItemPositionsListener.create();
19+ final ScrollOffsetListener scrollOffsetListener = ScrollOffsetListener.create()
1920
2021ScrollablePositionedList.builder(
2122 itemCount: 500,
2223 itemBuilder: (context, index) => Text('Item $index'),
2324 itemScrollController: itemScrollController,
2425 itemPositionsListener: itemPositionsListener,
26+ scrollOffsetListener: scrollOffsetListener,
2527);
2628```
2729
@@ -46,6 +48,15 @@ One can monitor what items are visible on screen with:
4648itemPositionsListener.itemPositions.addListener(() => ...);
4749```
4850
51+ Changes in scroll position can be monitored with:
52+
53+ ``` dart
54+ scrollOffsetListener.changes.listen((event) => ...)
55+ ```
56+
57+ see ` ScrollSum ` in [ this test] ( test/scroll_offset_listener_test.dart ) for an example of how the current offset can be
58+ calculated from the stream of scroll change deltas. This feature is new and experimental.
59+
4960A full example can be found in the example folder.
5061
5162--------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 11name : scrollable_positioned_list
2- version : 0.3.6
2+ version : 0.3.7
33description : >
44 A list with helper methods to programmatically scroll to an item.
55homepage : https://github.com/google/flutter.widgets/tree/master/packages/scrollable_positioned_list
You can’t perform that action at this time.
0 commit comments