whenever
inline fun <T> StyleClass.whenever(upstream: Flow<T>, crossinline mapper: suspend (T) -> Boolean): Flow<StyleClass>
Content copied to clipboard
function to apply a given class only when a condition is fullfiled.
Return
Flow containing the class name if check returns true or nothing
Parameters
<receiver>
css class to apply
mapper
defining the rule, when to apply the class
upstream
Flow that holds the value to check
function to apply a given class only when a condition is fullfiled.
Return
Flow containing the class name if check returns true or nothing
Parameters
<receiver>
css class to apply
upstream
Flow that holds the value to check