getScreenScale method

Future<double> getScreenScale()

Gets the device pixel ratio (scale factor) of the screen where the WebView is displayed.

The scale factor represents the ratio between physical pixels and logical pixels. For example, on a HiDPI display, this might return 2.0.

Officially Supported Platforms/Implementations:

Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.

Implementation

Future<double> getScreenScale() => platform.getScreenScale();