# toConstantDpOrNull

> Converts this [RemoteDp] to a [Dp] if it has a constant value, or null otherwise.

## API Reference

### toConstantDpOrNull

> Source set: Android

```kotlin
@Stable public fun RemoteDp.toConstantDpOrNull(): 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, or null otherwise.

#### 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), or `null` if it is dynamic
