AnimatedPhysicalModel constructor

const AnimatedPhysicalModel(
  1. {Key key,
  2. @required Widget child,
  3. @required BoxShape shape,
  4. Clip clipBehavior: Clip.none,
  5. BorderRadius borderRadius:,
  6. @required double elevation,
  7. @required Color color,
  8. bool animateColor: true,
  9. @required Color shadowColor,
  10. bool animateShadowColor: true,
  11. Curve curve: Curves.linear,
  12. @required Duration duration,
  13. VoidCallback onEnd}

Creates a widget that animates the properties of a PhysicalModel.

The child, shape, borderRadius, elevation, color, shadowColor, curve, clipBehavior, and duration arguments must not be null. Additionally, elevation must be non-negative.

Animating color is optional and is controlled by the animateColor flag.

Animating shadowColor is optional and is controlled by the animateShadowColor flag.


const AnimatedPhysicalModel({
  Key key,
  @required this.child,
  @required this.shape,
  this.clipBehavior = Clip.none,
  this.borderRadius =,
  @required this.elevation,
  @required this.color,
  this.animateColor = true,
  @required this.shadowColor,
  this.animateShadowColor = true,
  Curve curve = Curves.linear,
  @required Duration duration,
  VoidCallback onEnd,
}) : assert(child != null),
     assert(shape != null),
     assert(clipBehavior != null),
     assert(borderRadius != null),
     assert(elevation != null && elevation >= 0.0),
     assert(color != null),
     assert(shadowColor != null),
     assert(animateColor != null),
     assert(animateShadowColor != null),
     super(key: key, curve: curve, duration: duration, onEnd: onEnd);