- override
Convert a position or velocity measured in terms of pixels to a scrollOffset. Scrollable gesture handlers convert their incoming values with this method. Subclasses that define scrollOffset in units other than pixels must override this method.
This function should be the inverse of scrollOffsetToPixelOffset
.
Source
@override double pixelOffsetToScrollOffset(double pixelOffset) { final double unit = pixelsPerScrollUnit; return super.pixelOffsetToScrollOffset(unit == 0.0 ? 0.0 : pixelOffset / unit); }