Function

toConstantDp

Converts this RemoteDp to a Dp if it has a constant value.

toConstantDp

Source set: Android
@Stable public fun RemoteDp.toConstantDp(): Dp

Converts this RemoteDp to a Dp if it has a constant value.

Return

the constant Dp value of this RemoteDp

Throws: IllegalStateException

if this state does not have a constant value.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: