roundToNearestPixel method

double roundToNearestPixel(
  1. double offset
)

Implementation

double roundToNearestPixel(double offset) {
  return (offset * devicePixelRatio).roundToDouble() / devicePixelRatio;
}