getUrl method

Future<Uri?> getUrl()

Gets the URL for the current page. This is not always the same as the URL passed to WebView.onLoadStart because although the load for that URL has begun, the current page may not have changed.

Supported Platforms/Implementations:

Implementation

Future<Uri?> getUrl() async {
  Map<String, dynamic> args = <String, dynamic>{};
  String? url = await _channel.invokeMethod('getUrl', args);
  return url != null ? Uri.tryParse(url) : null;
}