This site requires javascript.
Android Code Search
file:androidx/compose/foundation/lazy/layout/LazyLayoutMeasureScope.kt function:toDp
search
close
info_outline
more_vert
Result 1 of 1
content_copy
Search Result Root
androidx/platform/frameworks/support
keyboard_arrow_right
Branch
Branch
androidx-main
keyboard_arrow_right
Search Result Path
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/layout/
LazyLayoutMeasureScope.kt
content_copy
Preview
68:
69:
70:
@Stable
override
fun
TextUnit.
toDp
(): Dp {
checkPrecondition(type == TextUnitType.Sp) {
"Only Sp can convert to Px"
}
74:
75:
76:
77:
@Stable
override
fun
Int.
toDp
(): Dp = (this / density).dp
@Stable
override
fun
Float.
toDp
(): Dp = (this / density).dp
92:
93:
94:
@Stable
override
fun
Size.
toDp
Size(): DpSize =
if
(isSpecified) {
130:
131:
132:
133:
134:
135:
136:
/** Below overrides added to work around https://youtrack.jetbrains.com/issue/KT-51672 */
override
fun
TextUnit.
toDp
(): Dp = with(subcomposeMeasureScope) { toDp() }
override
fun
Int.
toDp
(): Dp = with(subcomposeMeasureScope) { toDp() }
override
fun
Float.
toDp
(): Dp = with(subcomposeMeasureScope) { toDp() }
145:
146:
override
fun
Size.
toDp
Size(): DpSize = with(subcomposeMeasureScope) { toDpSize() }
}
chevron_left
1
chevron_right
Results per page
10
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Got it
Help
Open branch androidx-main