Compose Unstyled 2.0 is out! Check the official announcement blog ->
Function

ToggleableState

Return corresponding ToggleableState based on a Boolean representation

ToggleableState

Source set: Common
fun ToggleableState(value: Boolean) = if (value) On else Off

Return corresponding ToggleableState based on a Boolean representation

Parameters

value whether the ToggleableState is on or off

Last updated: