animate method Null safety

Gradient animate(
  1. {required Animation<double> controller,
  2. Map<GradientAnimation, dynamic> storyboard = const {},
  3. GradientCopyWith overrideCopyWith = spectrumCopyWith}

Returns the AnimatedGradient.observe animated Gradient output from a new AnimatedGradient constructed by this gradient and the provided parameters.

Provide, for example, an AnimationController as controller to push the flow of the animation. Consider driving the controller by controller.repeat(reverse:true).

The storyboard is a Map<GradientAnimation, dynamic> where dynamic correlates to the given key.


Gradient animate({
  required Animation<double> controller,
  Map<GradientAnimation, dynamic> storyboard = const {},
  GradientCopyWith overrideCopyWith = spectrumCopyWith,
}) =>
      gradient: this,
      controller: controller,
      storyboard: storyboard,
      overrideCopyWith: overrideCopyWith,