animation(_:value:)
Applies the given animation to this view when the specified value changes.
Declaration
nonisolated func animation<V>(_ animation: Animation?, value: V) -> some View where V : Equatable
Parameters
- animation:
The animation to apply. If
animationisnil, the view doesn’t animate. - value:
A value to monitor for changes.
Mentioned in
Return Value
A view that applies animation to this view whenever value changes.