requestFocusNodeHref method Null safety

Future<RequestFocusNodeHrefResult?> requestFocusNodeHref()

Requests the anchor or image element URL at the last tapped point.

NOTE: On iOS it is implemented using JavaScript.

Official Android API: https://developer.android.com/reference/android/webkit/WebView#requestFocusNodeHref(android.os.Message)

Implementation

Future<RequestFocusNodeHrefResult?> requestFocusNodeHref() async {
  Map<String, dynamic> args = <String, dynamic>{};
  Map<dynamic, dynamic>? result =
      await _channel.invokeMethod('requestFocusNodeHref', args);
  return result != null
      ? RequestFocusNodeHrefResult(
          url: result['url'] != null ? Uri.parse(result['url']) : null,
          title: result['title'],
          src: result['src'],
        )
      : null;
}