getNearestXFromPixels method

double? getNearestXFromPixels(
  1. double pixels
)

Implementation

double? getNearestXFromPixels(double pixels) => nearestXForOffset(
      bounds,
      items.map((item) => item.x).toSet(),
      pixels,
      contentWidth,
    );