Let’s say I’d like to animate a Card() using a Flo...
# compose
c
Let’s say I’d like to animate a Card() using a FloatPropKey with values from 0f to 1f. How could I approach this currently?
d
What property do you want to animate?
c
The width
d
I believe you can easily achieve that with the
animate
function.
1
How do you currently specify the width?
Modifier.width(...)
?
c
I use fillMaxWidth()
d
Perfect!
Modifier.fillMaxWidth(animate(amount))
.
amount
can change from 1f to 0f and it'll just work.
👍 1
c
Cool thank you, I’ll take a look into it!
Finally got the time look into it: It’s working perfectly, thank you! 🙂
d
Nice