An example of how to animate gradients in flutter
An example project demonstrating how to animate gradients!
Run the app as you normally do with Flutter!
beginGradient.lerpTo(endGradient, 0.7)
lerp
methods provide by the LinearGradient
class.Animation<LinearGradient>
from the Tween using an AnimationController
: final animation = tween.animate(controller);
AnimatedBuilder