nearestX property

double? get nearestX

Implementation

double? get nearestX {
  assert(
    !hasPixels || hasContentDimensions,
    'Nearest items are only available after content dimensions are established.',
  );
  return !hasPixels || !hasContentDimensions
      ? null
      : getNearestXFromPixels(
          clampDouble(pixels, minScrollExtent, maxScrollExtent));
}