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+.

Supported Platforms/Implementations:

  • Android native WebView
  • iOS

Implementation

Future<String?> getSelectedText() async {
  Map<String, dynamic> args = <String, dynamic>{};
  return await _channel.invokeMethod('getSelectedText', args);
}