INNER CODE UNIT · Dart

scrollViewOffset

fluttercandies/flutter_scrollview_observer · lib/src/observer_core.dart:52

    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);
      if (nextChild == null) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…