invalidateDrawForSubtree
fun DelegatableNode.invalidateDrawForSubtree()
Invalidates draw for the entire subtree of this node.
Note that invalidateDraw
is preferable in most cases, however it is only guaranteed to
invalidate draw for that specific node, and it is possible that draw nodes that are underneath it
could be cached and thus their draw methods will not get re-executed. Use this API if you need to
ensure that draw is called for all draw nodes below this one. This might be necessary in certain
situations where you are updating some data which you know descendant nodes use, but you are not
relaying on automatic snapshot observation through androidx.compose.runtime.MutableState
.
Calling this method can be a relatively expensive operation as it will cause the entire subtree
to redraw instead of just parts that are otherwise invalidated. invalidateDraw
is preferable in
most cases, and this should only be used when absolutely necessary.