getUrl method

Future<WebUri?> getUrl()

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

NOTE for Web: If window.location.href isn't accessible inside the iframe, it will return the current value of the iframe.src attribute.

Officially Supported Platforms/Implementations:

Implementation

Future<WebUri?> getUrl() => platform.getUrl();