INNER CODE UNIT · Dart
rawScrollViewOffset
fluttercandies/flutter_scrollview_observer · lib/src/observer_core.dart:51
final rawScrollViewOffset = _obj.constraints.scrollOffset + overlap;
var scrollViewOffset = rawScrollViewOffset + offset;
var parentData = firstChild.parentData as SliverMultiBoxAdaptorParentData;
var index = parentData.index ?? 0;
// Whether the first child being displayed is not found.
bool isNotFound = false;
// Find out the first child which is displaying
var targetFirstChild = firstChild;
while (!ObserverUtils.isBelowOffsetWidgetInSliver(
scrollViewOffset: scrollViewOffset,
scrollDirection: scrollDirection,
targetChild: targetFirstChild,
toNextOverPercent: toNextOverPercent,
)) {
index = index + 1;
var nextChild = _obj.childAfter(targetFirstChild);