executeScript method
Runs the JavaScript script
in the current top-level document rendered in
the WebView and returns its result.
Implementation
Future<dynamic> executeScript(String script) async {
if (_isDisposed) {
return;
}
assert(value.isInitialized);
final data = await _methodChannel.invokeMethod('executeScript', script);
if (data == null) return null;
return jsonDecode(data as String);
}