Nat Strangerweather
12/07/2020, 7:23 PMCard(
Modifier
.clickable(indication = null, onClick = {}
I want my card to be clickable only if the "isEnabled" Boolean is true. Something like .if (isEnabled) clickable()
...Zach Klippenstein (he/him) [MOD]
12/07/2020, 7:26 PMvar modifier = Modifier
if (isEnabled) modifier = modifier.clickable(…)
You could use let
or something tooZach Klippenstein (he/him) [MOD]
12/07/2020, 7:27 PMNat Strangerweather
12/07/2020, 7:27 PMAdriano Celentano
12/07/2020, 8:50 PMNat Strangerweather
12/07/2020, 9:03 PMLouis Pullen-Freilich [G]
12/07/2020, 9:06 PMthen
function:
Modifier
.then(if (enabled) Modifier.clickable() else Modifier)
.something()
.else()
Nat Strangerweather
12/07/2020, 9:09 PMAdriano Celentano
12/07/2020, 10:15 PMNat Strangerweather
12/07/2020, 10:28 PM