flutter_sticky_header icon indicating copy to clipboard operation
flutter_sticky_header copied to clipboard

Scrollable.ensureVisible(context) broken due to incorrect childScrollOffset()

Open spkersten opened this issue 4 years ago • 2 comments

When using Scrollable.ensureVisible(context) on a child of SliverStickyHeader with overlapsContent: true, the Scrollable scrolls to the wrong position.

The problem appears to be in childScrollOffset (https://github.com/letsar/flutter_sticky_header/blob/master/lib/src/rendering/sliver_sticky_header.dart#L346) which returns _headerExtent even with overlapping headers. I think that should be headerLogicalExtent (= overlapsContent ? 0.0 : _headerExtent).

spkersten avatar Mar 29 '21 15:03 spkersten

Is it still the case?

letsar avatar Jul 13 '22 17:07 letsar