AnimatedPhysicalModel constructor
- Key? key,
- required Widget child,
- BoxShape shape = BoxShape.rectangle,
- Clip clipBehavior = Clip.none,
- BorderRadius? borderRadius,
- double elevation = 0.0,
- required Color color,
- bool animateColor = true,
- required Color shadowColor,
- bool animateShadowColor = true,
- Curve curve = Curves.linear,
- required Duration duration,
- VoidCallback? onEnd,
Creates a widget that animates the properties of a PhysicalModel.
The 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.
Implementation
const AnimatedPhysicalModel({
super.key,
required this.child,
this.shape = BoxShape.rectangle,
this.clipBehavior = Clip.none,
this.borderRadius,
this.elevation = 0.0,
required this.color,
this.animateColor = true,
required this.shadowColor,
this.animateShadowColor = true,
super.curve,
required super.duration,
super.onEnd,
}) : assert(elevation >= 0.0);