fun Modifier.animation(animation: Animation?): ModifierOverview
To animate a state change made in Kotlin, wrap it in withAnimation(Animation.spring) { … }.
Modifier.animation(animation = Animation.…)This is the Kotlin form of SwiftUI View.animation(_:): SwiftUI documentation. In Swift it reads:
nonisolated func animation(_ animation: Animation?) -> some ViewTopics
Overloads
fun Modifier.animation(animation: Animation?, value: Any): Modifier
fun Modifier.animation(animation: Animation?): Modifier