getScreenScale method
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:
- Linux WPE WebKit (Official API - wpe_screen_get_scale)
Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.
Implementation
Future<double> getScreenScale() => platform.getScreenScale();