google / accompanist

A collection of extension libraries for Jetpack Compose
https://google.github.io/accompanist
Apache License 2.0
7.43k stars 598 forks source link

[WebView] Do not require an URL on state creation #1573

Closed iscle closed 1 year ago

iscle commented 1 year ago

Description Right now, when the WebView state is created it requires a URL string to be passed in. This is fine in most occasions, but sometimes the URL is retrieved asynchronously and might not be known when the state is created. This can easily be worked around by loading "about:blank" first and loading the correct url afterwards.
However, this workaround adds the "about:blank" page to the back stack, and when pressing the back button we get a blank screen.

I think there should be the option to not load any url at the start, and let the developer load it when it finds it convenient, like the normal view allows us to do.

Regards, Iscle