canScrollHorizontally method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(), LinuxPlatform(note: 'This method is implemented using JavaScript.'), MacOSPlatform(note: 'This method is implemented using JavaScript.'), WebPlatform()])
Future<bool> canScrollHorizontally()

Returns true if the webpage can scroll horizontally, otherwise false.

Officially Supported Platforms/Implementations:

  • Android WebView
  • iOS WKWebView
  • Linux WPE WebKit:
    • This method is implemented using JavaScript.
  • macOS WKWebView:
    • This method is implemented using JavaScript.
  • Web <iframe> but requires same origin

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

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(),
    IOSPlatform(),
    LinuxPlatform(note: 'This method is implemented using JavaScript.'),
    MacOSPlatform(note: 'This method is implemented using JavaScript.'),
    WebPlatform(),
  ],
)
Future<bool> canScrollHorizontally() {
  throw UnimplementedError(
    '${PlatformInAppWebViewControllerMethod.canScrollHorizontally.name} is not implemented on the current platform',
  );
}