onScrollChanged method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'WebView.onScrollChanged', apiUrl: 'https://developer.android.com/reference/android/webkit/WebView#onScrollChanged(int,%20int,%20int,%20int)'), IOSPlatform(apiName: 'UIScrollViewDelegate.scrollViewDidScroll', apiUrl: 'https://developer.apple.com/documentation/uikit/uiscrollviewdelegate/1619392-scrollviewdidscroll'), MacOSPlatform(note: 'This event is implemented using JavaScript.')])
void onScrollChanged(
  1. int x,
  2. int y
)

Event fired when the WebView scrolls.

x represents the current horizontal scroll origin in pixels.

y represents the current vertical scroll origin in pixels.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • x: all platforms
  • y: all platforms

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

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(
      apiName: 'WebView.onScrollChanged',
      apiUrl:
          'https://developer.android.com/reference/android/webkit/WebView#onScrollChanged(int,%20int,%20int,%20int)',
    ),
    IOSPlatform(
      apiName: 'UIScrollViewDelegate.scrollViewDidScroll',
      apiUrl:
          'https://developer.apple.com/documentation/uikit/uiscrollviewdelegate/1619392-scrollviewdidscroll',
    ),
    MacOSPlatform(note: 'This event is implemented using JavaScript.'),
  ],
)
void onScrollChanged(int x, int y) {}