build method

  1. @override
Widget build(
  1. BuildContext context,
  2. AnimatableColor? parameters
)
override

Builds this widget with the AnimatableParameters.

Only if an animation has been applied will parameters be non-null. If parameters is null, the widget should be built without animation. If parameters is non-null, the widget should use the AnimatableParameter.animatedValues.

Implementation

@override
Widget build(BuildContext context, AnimatableColor? parameters) {
  return ColoredBox(
    color: parameters?.animatedValue ?? color,
    child: child,
  );
}