Skip to main content

positioned_sliver_list 0.2.5 copy "positioned_sliver_list: ^0.2.5" to clipboard
positioned_sliver_list: ^0.2.5 copied to clipboard

A virtualized sliver list with variable heights, exact index navigation, scroll anchoring, pixel scrolling and a scrollable_positioned_list compatible API.

0.2.5 #

  • Apply zero- or negative-duration pixel and item animations immediately instead of completing successfully while leaving the scroll position behind. A zero-duration fallback no longer calls Flutter's positive-duration-only ScrollPosition.animateTo.

  • Bulk-fill typed-data extents during a full refresh with a uniform estimate, avoiding a Dart per-item loop and reusing the backing buffer. Win 22 benchmarks cover large lists. A separate uniform-growth optimization was discarded because its benchmark showed no dependable improvement.

  • Cancel pending index navigation when pixel scrolling, dragging, the mouse wheel or a trackpad takes control; preserve user scroll-offset notifications.

  • Honor the initial item position when an asynchronous list first loads from empty, including separated lists and restored positions.

  • Keep overscroll reservations owned by the active animation and let animation handles cancel a pending final correction without affecting a replacement.

  • Add logical keyed-item remapping to SuperListView.separated through findItemIndexCallback, while preserving findChildIndexCallback behavior.

  • Guard structural extent updates during layout and release spare Fenwick storage when a large list shrinks.

  • Cache first-layout order and share the viewport transform across item-position reports, preserving geometry for RTL, reverse, pinned and kept-alive items.

0.2.4 #

  • Keep the content after a list in place when an estimate refresh changes the extent of that list while it is scrolled past, for example a width change with another list below it in the same viewport. The scroll position previously landed inside the first list.
  • A new crossAxisLayoutKey function that returns a different key for the current width refreshes estimates like a width change, so a list of 4096 items or more defers that refresh while the change continues. A key that depends on the window width, and not only on the width of the list, no longer refreshes all estimates in every frame of a window resize.

0.2.3 #

  • Keep the scroll position during an estimate refresh (a width change, estimationKey, invalidateAllExtents or updateEstimatedExtents) while a header anchor (preserveHeader) is active or a jump to a laid out item is pending. The list previously built and disposed every item between the old and the corrected position in one frame (about 23,000 items for a width change in the middle of 190,000).
  • Add ListController.estimateRefreshStats and timeline events for full estimate refreshes and offset index rebuilds, both linear in the item count.
  • Rebuild the offset index in its previous buffer instead of allocating a new one (SuperSliverListPerfFlags.reuseFenwickBuffer), and reserve close to the required size on a large first resize instead of the next power of two (SuperSliverListPerfFlags.nearExactLargeGrowth). Releasing extent capacity never shrinks it below the initial 16 slots.
  • indexForScrollOffset and layout no longer map an offset just below the total extent to an index past the last item when floating-point sums disagree.
  • Replace a non-finite or negative estimate with the default extent of 100 (0 for the uniform query) so the total extent stays finite, for example when an estimator divides by a zero width. Debug builds report the first one.
  • Schedule one delayed layout per list and frame, however many times the list is laid out in that frame.
  • Compatibility API: rebuilds of ScrollablePositionedList in the same frame notify itemPositionsListener once.
  • Add notifyPositionsOnRebuild (default true). When false, a rebuild that moves nothing no longer notifies, unless the listener, the separated mode, listController or restorePosition changed. Scrolls, jumps and position restoration are unaffected.
  • Add crossAxisLayoutKey to SuperSliverList, SuperListView and ScrollablePositionedList. A width change for which the key stays equal keeps measured extents and estimates and calls the estimator for no item; without a key every width change still refreshes all estimates. EstimateRefreshStats.skippedResizeCount counts the skipped changes. Keys are compared with identical or ==, so return a value with value equality.
  • A list of at least 4096 items defers the estimate refresh while its width changes in consecutive frames (SuperSliverListPerfFlags.deferCrossAxisEstimateRefresh). The estimator is no longer called for every item in every frame of the change: it is called once, in the first layout after the width settles, and only for the items not measured at the final width. Until then items outside the laid out range keep their previous extents, marked as estimated. Jumps, estimationKey, invalidateAllExtents and updateEstimatedExtents still refresh immediately, and no refresh runs at zero width. EstimateRefreshStats.deferredResizeCount and the timeline event PositionedSliverList.deferWidthRefresh report it. Extent precalculation pauses during the change.

0.2.2 #

  • Recover header anchors after keyed collapse or expansion changes child indices, preserving their first-frame position and neighboring keyed state.
  • Correct from the retained header before filling newly inserted index gaps, keeping large group expansion virtualized.
  • Refresh anchored descendant geometry inside fixed-height layout boundaries, using the same layout callback protocol as exact navigation targets.

0.2.1 #

  • Run target rectangle resolvers through Flutter's layout callback protocol so they can read laid-out descendant geometry in debug builds as well as release.
  • Refresh a mounted target's descendant layout before resolving its rectangle, including when nested size changes leave the list item's total height unchanged.
  • Add regressions that resolve targets inside nested render boxes during the first layout, jumps and animations.

0.2.0 #

  • Refresh numerical extent estimates on width changes, explicit invalidation and estimationKey changes. Rebuilding an estimator callback alone does not cause a full scan.
  • Add ListController.updateEstimatedExtents for atomic local updates that keep the visible anchor, notify once and complete after layout. The compatibility controller translates logical indices for separated lists.
  • Distant jumps start with the target item even when its estimated offset is near the beginning of the list, avoiding thousands of unnecessary builds.
  • Release unused Fenwick-tree capacity after a substantial list shrink, while keeping headroom for small shrink/grow cycles.
  • Add targetRectResolver to index jumps and animations, and initialTargetRectResolver for the first layout. Resolve the target after measuring its item, before paint, including horizontal, reversed and RTL lists.
  • Add indexForScrollOffset to map viewport scroll pixels to estimated item indices, accounting for preceding slivers, padding and reserved blank space.
  • Extend header anchoring to shrink-wrapped lists.
  • Compatibility API: add jumpToAsync, restoreAnchor/restoreAnchorAsync, external ListController ownership and findChildIndexCallback forwarding. Keep state and measured extents with stable keyed items through a reorder.
  • Isolate compatibility anchors from ScrollController's PageStorage slot, preserve the complete storage-key ancestry, and restore leading padding without applying it twice.
  • Add regressions for lifecycle cancellation, controller replacement, batched updates, restoration, first-frame targets, directions and bounded builds.

0.1.0 #

First release as positioned_sliver_list, a fork of super_sliver_list 0.4.1.

  • ListController.jumpToIndex and ListController.scrollToIndex place an item's leading edge at a fraction of the viewport plus an offset. Jumps are resolved exactly during layout, before paint, and build only the items around the target. Long animations jump near the target first and run as a cancelable scroll activity.
  • ListController.animateToItem returns an AnimationHandle that is also a Future<void>, and no longer jumps through every item on the way.
  • SuperSliverList.initialIndex, initialAlignment and initialOffset position the list before the first paint.
  • SuperSliverList.overscrollToTarget (OverscrollToTarget.none by default) can reproduce how scrollable_positioned_list clamps at the edges (matchScrollablePositionedList, the default of the compatibility layer), or add blank space before the first or after the last item so that every target lands exactly (always), for example the last item at the top of the viewport. That space shrinks as the user scrolls back and is used up by appended items; ListController.overscrollSpace reports it.
  • ListController.itemPositions publishes the visible items after layout, never from a layout older than the scroll offset or the pending jump; ListController.computeItemPositions reads them on demand, and ListController.anchor reports the item at the viewport's leading edge.
  • The item at the viewport's leading edge keeps its position when items above it change extent or the leading padding changes, and keeps its scrolled-past fraction when the width changes.
  • A controller briefly attached to two lists keeps the newest one.
  • package:positioned_sliver_list/positioned_list.dart: a replacement for the scrollable_positioned_list API.
  • SuperListView takes scrollCacheExtent instead of the deprecated cacheExtent. Requires Flutter 3.44.
  • Includes the Telosnex fork (initial end position, cancelable reveal operations, public getOffsetToReveal, StickToTarget, header anchoring, leak fixes, a cap on scroll correction cycles, performance work) and the ahey fix for slivers that stopped laying out after a scroll correction, limited to the sliver's viewport.

super_sliver_list history #

0.4.1 #

  • Fix missing propagation of rect inside RenderViewportExt.getOffsetToRevealExt.
  • Add missing constructors in SuperSliverList to have SliverList parity.

0.4.0 #

  • BREAKING: Changed signature of ExtentEstimationProvider where the index is now nullable.
  • Added layoutKeptAliveChildren argument to SuperSliverList.
  • Improved performance with very large lists (millions of items).
  • Bugfixes

0.3.0 #

  • Fixed layout exception for shrink-wrapped lists.
  • BREAKING: ExtentPrecalculationContext.viewportMainAxisExtent is now nullable

0.2.2 #

  • Fixed exception when calling markAllDirty on empty list.

0.2.1 #

  • Prevent overscroll when jumping and animating to items at the edge with alignment that would otherwise cause overscroll. For example jumping to the first item with alignment: 1.0 or jumping to the last item with alignment: 0.0 should no longer cause overscroll.

0.2.0 #

  • Added visibleRange and unobstructedVisibleRange properties to ListController.
  • Layout fixes.
  • Renamed ExtentController to ListController.

0.2.0-dev.2 #

  • Introduced the concept of child obstruction extent. This is a property that can be set on Sliver geometry and allows for reliable positioning of items in slivers that are wrapped in a sticky header sliver.
  • Added sticky headers to example.

0.2.0-dev.1 #

This is a major update and a complete rewrite of SuperSliverList.

  • Added SuperListView as a convenient drop-in replacement for ListView.
  • Added ability to jump / animate to specific item using ExtentController.
  • Added ability to asynchronously precompute item extents using ExtentPrecalculationPolicy.
  • Comprehensive test coverage.

0.0.8 #

  • Fixed problem when accessing layout offset from a LayoutBuilder child widget.

0.0.7 #

  • Fix inserted children not being build properly.

0.0.6 #

  • Bug fixes

0.0.5 #

  • Bug fixes

0.0.4 #

  • Bug fixes

0.0.3 #

  • Various bug fixes and improvements

0.0.2 #

  • Various bug fixes

0.0.1 #

  • Initial release
2
likes
160
points
13.7k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A virtualized sliver list with variable heights, exact index navigation, scroll anchoring, pixel scrolling and a scrollable_positioned_list compatible API.

Repository (GitHub)
View/report issues

Topics

#list #scrolling #sliver #widget

License

MIT (license)

Dependencies

collection, flutter, logging

More

Packages that depend on positioned_sliver_list