canScrollHorizontally method

  1. @override
Future<bool> canScrollHorizontally()

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

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
  • iOS
  • MacOS
  • Web

Implementation

@override
Future<bool> canScrollHorizontally() async {
  Map<String, dynamic> args = <String, dynamic>{};
  return await channel?.invokeMethod<bool>('canScrollHorizontally', args) ??
      false;
}