<div class='type'>Function</div>


<a id='references'></a>


<h2 id="requiredensity">requireDensity</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun DelegatableNode.requireDensity(): Density
```


Returns the current `Density` of the LayoutNode that this `DelegatableNode` is attached to. If
the node is not attached, this function will throw an `IllegalStateException`.