androidx.compose.ui.platform

LocalDensity

Top-level property · from org.jetbrains.compose.ui:ui:1.12.2

No hand-written docs yet.

Provides the Density to be used to transform between [density-independent pixel units (DP)]androidx.compose.ui.unit.Dp and pixel units or [scale-independent pixel units (SP)]androidx.compose.ui.unit.TextUnit and pixel units. This is typically used when a DP``androidx.compose.ui.unit.Dp is provided and it must be converted in the body of Layout or DrawModifier.

val LocalDensity: ProvidableCompositionLocal<T> = staticCompositionLocalOf<Density> { noLocalProvidedFor("LocalDensity") }