thenIfNotNull

Applies a @Composable modifier step only when value is non-null, passing the unwrapped value into block — the idiom behind every optional field in Modifier.styledWith (windowInsets, margin, clip, background, border, padding are each applied this way, since a tile's StyleSchema leaves most of them null by default).

Return

the receiver with the step appended, or unchanged if value is null.

Parameters

value

the optional value to check.

block

builds the step to apply, receiving value unwrapped. Not called at all when value is null — the receiver is returned unchanged in that case.