pixelRatio property
The pixel ratio of the screen. This is used to scale the image generated by rasterizeSubtree to the correct size.
Defaults to FlutterView.devicePixelRatio.
Implementation
double pixelRatio =
pixelRatio ?? PlatformDispatcher.instance.views.first.devicePixelRatio;