mgrazianodecastro
03/28/2023, 7:36 PMmgrazianodecastro
03/28/2023, 7:38 PMwith(LocalDensity.current) {
// code here, Dp interface will have the extension .toPx()
}
maiatoday
03/28/2023, 7:46 PM@Composable
fun Dp.toPx() = with(LocalDensity.current) { this@toPx.toPx() }
@Composable
fun Int.toDp() = with(LocalDensity.current) { this@toDp.toDp() }