Using WebView in a LazyColumn item crashes with th...
# compose-ios
v
Using WebView in a LazyColumn item crashes with this error Anyone knows how to fix this
kotlin.IllegalStateException: Size(1074 x 2147483647) is out of range. Each dimension must be between 0 and 16777215.
Webview code
Copy code
Column(modifier = Modifier.fillMaxWidth()) {
    if (canRemove)
        RemoveButton(
            modifier = Modifier.align(Alignment.End).padding(16.dp).size(24.dp),
            onRemove = onRemove
        )
    WebView(
        state = webViewState,
        modifier = Modifier.fillMaxWidth(),
        navigator = navigator,
        captureBackPresses = false
    )
}
m
Items inside lazy columns need to have a finite height
Also, webview has its own scrolling, so there's no need to put it inside a lazy column.
v
The items in my lazy column Have a link, which i want to embed, example a Tweet, So i have to use WebView Looks like this on Android
Due to this WebView in LazyColumn item I cant also use IntrinsicSize
m
Got it, maybe you can set the height to 100.dp or something then figure out a way to access the web page height and change it in Compose.
v
I tried setting fixed height to the webview but then the webview is just blank
226 Views