toStyles

fun Modifier.toStyles(finalHandler: StyleScope.() -> Unit? = null): StyleScope.() -> Unit(source)

Convert a Modifier into a StyleScope which can be used to initialize a StyleSheet, for example.

Parameters

finalHandler

A handler which, if supplied, gets called at the very end before returning the builder. This can be useful to occasionally avoid the creation of an unnecessary StyleModifier to append at the tail.