Dazai
05/09/2022, 3:14 AMlilypuchi
05/09/2022, 3:27 AMLocalDensity.current
right?
You can declare it outside (in the @Composable
context) and use it from there on. Something like,
@Composable
fun Screen(
modifier: Modifier = Modifier,
navigateBack: () -> Unit,
) {
val density = LocalDensity.current
Column(
modifier = modifier
.clickable {
with(density) {
}
}
) {}
}
Dazai
05/09/2022, 3:41 AM