#123 improved scroll bar / position stability

This commit is contained in:
Thibault Deckers 2021-12-10 16:51:04 +09:00
parent 5e2731484e
commit 8cb88cc12c

View file

@ -97,13 +97,9 @@ class _RenderSliverKnownExtentBoxAdaptor extends RenderSliverMultiBoxAdaptor {
double? leadingScrollOffset, double? leadingScrollOffset,
double? trailingScrollOffset, double? trailingScrollOffset,
}) { }) {
return childManager.estimateMaxScrollOffset( // default implementation is an estimation via `childManager.estimateMaxScrollOffset()`
constraints, // but we have the accurate offset via pre-computed section layouts
firstIndex: firstIndex, return _sectionLayouts.last.maxOffset;
lastIndex: lastIndex,
leadingScrollOffset: leadingScrollOffset,
trailingScrollOffset: trailingScrollOffset,
);
} }
double computeMaxScrollOffset(SliverConstraints constraints) { double computeMaxScrollOffset(SliverConstraints constraints) {