iconButtonOrNull

fun IconSchema?.iconButtonOrNull(onClick: () -> Unit): @Composable () -> Unit?

Wraps this optional IconSchema into a clickable @Composable lambda — an IconButton wrapping Icon and firing onClick. Used by tiles like TextField, where clickableLeadingIcon/ clickableTrailingIcon decides whether the optional icon should be wrapped this way or rendered plainly via iconOrNull instead.

Return

a composable rendering this icon as a tappable button, or null if the receiver itself is null.

Parameters

onClick

called when the wrapping IconButton is tapped.