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