For more information, visit the documentation: https://google.github.io/accompanist/web/
To implement this wrapper there are two key APIs which are needed: WebView, which provides the layout, and rememberWebViewState(url) which provides some remembered state including the URL to display.
The basic usage is as follows:
val state = rememberWebViewState("https://example.com")
WebView(state)This will display a WebView in your Compose layout that shows the URL provided.
repositories {
mavenCentral()
}
dependencies {
implementation "io.github.robinpcrd.accompanist:accompanist-webview:<version>"
}