AnimatedPhysicalModel constructor
Creates a widget that animates the properties of a PhysicalModel.
The child
, shape
, borderRadius
, elevation
, color
, shadowColor
, curve
, and
duration
arguments must not be null.
Animating color
is optional and is controlled by the animateColor
flag.
Animating shadowColor
is optional and is controlled by the animateShadowColor
flag.
Implementation
const AnimatedPhysicalModel({
Key key,
@required this.child,
@required this.shape,
this.clipBehavior = Clip.none,
this.borderRadius = BorderRadius.zero,
@required this.elevation,
@required this.color,
this.animateColor = true,
@required this.shadowColor,
this.animateShadowColor = true,
Curve curve = Curves.linear,
@required Duration duration,
}) : assert(child != null),
assert(shape != null),
assert(clipBehavior != null),
assert(borderRadius != null),
assert(elevation != null),
assert(color != null),
assert(shadowColor != null),
assert(animateColor != null),
assert(animateShadowColor != null),
super(key: key, curve: curve, duration: duration);