scrollBy method

Future<void> scrollBy({
  1. required int x,
  2. required int y,
  3. bool animated = false,
})

Moves the scrolled position of the WebView.

x represents the amount of pixels to scroll by horizontally.

y represents the amount of pixels to scroll by vertically.

animated true to animate the scroll transition, false to make the scoll transition immediate.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • x: all platforms
  • y: all platforms
  • animated: all platforms

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

Implementation

Future<void> scrollBy({
  required int x,
  required int y,
  bool animated = false,
}) => platform.scrollBy(x: x, y: y, animated: animated);