is there a clean way to do this?
# compose
d
is there a clean way to do this?
l
You must be getting the error for
LocalDensity.current
right? You can declare it outside (in the
@Composable
context) and use it from there on. Something like,
Copy code
@Composable
fun Screen(
    modifier: Modifier = Modifier,
    navigateBack: () -> Unit,
) {
    val density = LocalDensity.current

    Column(
        modifier = modifier
            .clickable {
                with(density) {
    
                }
            }
    ) {}
}
d
this worked, thanks!
🙌 1