nearestX property

double? get nearestX

Implementation

double? get nearestX {
  assert(
    positions.isNotEmpty,
    'ScrollableChartController.nearestX cannot be accessed before a ScrollableChart is built with it.',
  );
  assert(
    positions.length == 1,
    'The page nearestX cannot be read when multiple ScrollableChart are attached to '
    'the same ScrollableChartController.',
  );
  final ScrollableChartPosition position =
      this.position as ScrollableChartPosition;
  return position.nearestX;
}