# toConstantDp

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

## API Reference

### toConstantDp

> Source set: Android

```kotlin
@Stable public fun RemoteDp.toConstantDp(): Dp
```

Converts this [RemoteDp](https://composables.com/jetpack-compose/androidx.compose.remote/remote-creation-compose/functions/RemoteDp/api.md) to a `Dp` if it has a constant value.

#### Return

the constant [Dp](https://composables.com/jetpack-compose/androidx.compose.ui/ui-unit/classes/Dp/api.md) value of this [RemoteDp](https://composables.com/jetpack-compose/androidx.compose.remote/remote-creation-compose/functions/RemoteDp/api.md)

#### Throws: IllegalStateException

if this state does not have a constant value.
