INNER CODE UNIT · Dart

targetOffset

fluttercandies/flutter_scrollview_observer · lib/src/common/observer_controller.dart:1033

      targetOffset = remainingBottomExtent + scrollOffset;
    } else {
      targetOffset = needScrollExtent + scrollOffset;
    }
    // The remainingBottomExtent may be negative when the scrollView has too
    // few items.
    targetOffset = targetOffset.clamp(0, double.maxFinite);
    final calculateTargetLayoutOffset = targetOffset.rectify(obj);
    return ObservePrepareScrollToIndexModel(
      calculateTargetLayoutOffset: calculateTargetLayoutOffset,
      precedingScrollExtent: precedingScrollExtent,
      targetChildLayoutOffset: childLayoutOffset,
      isEnoughScroll: isEnoughScroll,
    );
  }

  /// Calculate the information about scrolling to the specified index location
  /// when the type is ObserverRenderSliverType.list.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…