build method

  1. @override
Widget build(
  1. BuildContext context,
  2. _ContainerAnimatableParameters? 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,
  _ContainerAnimatableParameters? parameters,
) {
  return Container(
    alignment: parameters?.alignment.animatedValue ?? alignment,
    padding: parameters?.padding.animatedValue ?? padding,
    color: parameters?.color.animatedValue ?? color,
    decoration: parameters?.decoration.animatedValue ?? decoration,
    foregroundDecoration: parameters?.foregroundDecoration.animatedValue ??
        foregroundDecoration,
    constraints: parameters?.constraints.animatedValue ?? constraints,
    margin: parameters?.margin.animatedValue ?? margin,
    transform: parameters?.transform.animatedValue ?? transform,
    transformAlignment:
        parameters?.transformAlignment.animatedValue ?? transformAlignment,
    clipBehavior: clipBehavior,
    child: child,
  );
}