Reputation: 55
I found that when changing the elevation of a card widget, it will animate it to the new value. In the docs I found this https://api.flutter.dev/flutter/material/Material/elevation.html which told me this is the expected behaviour. However, I want it to change instantly and not animate. How can I remove the animation?
Upvotes: 0
Views: 269
Reputation: 103421
Set animationDuration
property to zero ,
Material(
...
animationDuration: Duration.zero,
);
Use PhysicalModel instead of Card widget
Upvotes: 1