getSelectedText method

Future<String?> getSelectedText()

Gets the selected text.

NOTE: this method is implemented with using JavaScript.

NOTE for Android native WebView: available only on Android 19+.

NOTE for Web: this method will have effect only if the iframe has the same origin.

Officially Supported Platforms/Implementations:

  • Android native WebView
  • iOS
  • MacOS
  • Web

Implementation

Future<String?> getSelectedText() => platform.getSelectedText();