getScreenScale method
- @SupportedPlatforms.new(platforms: [LinuxPlatform(apiName: 'wpe_screen_get_scale', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-platform-1.0/method.Screen.get_scale.html')])
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
@SupportedPlatforms(
platforms: [
LinuxPlatform(
apiName: 'wpe_screen_get_scale',
apiUrl:
'https://wpewebkit.org/reference/stable/wpe-platform-1.0/method.Screen.get_scale.html',
),
],
)
Future<double> getScreenScale() {
throw UnimplementedError(
'${PlatformInAppWebViewControllerMethod.getScreenScale.name} is not implemented on the current platform',
);
}