getScrollY method
Returns the scrolled top position of the current WebView.
NOTE for Web: this method will have effect only if the iframe has the same origin.
NOTE for MacOS: it is implemented using JavaScript.
Officially Supported Platforms/Implementations:
- Android native WebView (Official API - View.getScrollY)
- iOS (Official API - UIScrollView.contentOffset)
- MacOS
- Web (Official API - Window.scrollY)
Implementation
@override
Future<int?> getScrollY() async {
Map<String, dynamic> args = <String, dynamic>{};
return await channel?.invokeMethod<int?>('getScrollY', args);
}