animatedPhysicalModel method
Widget
animatedPhysicalModel({
- required BoxShape shape,
- required double elevation,
- required Color color,
- required Color shadowColor,
- required Duration duration,
- Key? key,
- Clip clipBehavior = Clip.none,
- BorderRadius borderRadius = BorderRadius.zero,
- bool animateColor = true,
- bool animateShadowColor = true,
- Curve curve = Curves.linear,
- VoidCallback? onEnd,
Animated version of PhysicalModel.
The borderRadius and elevation are animated.
The color is animated if the animateColor property is set; otherwise, the color changes immediately at the start of the animation for the other two properties. This allows the color to be animated independently (e.g. because it is being driven by an AnimatedTheme).
The shape is not animated.
Implementation
Widget animatedPhysicalModel({
required BoxShape shape,
required double elevation,
required Color color,
required Color shadowColor,
required Duration duration,
Key? key,
Clip clipBehavior = Clip.none,
BorderRadius borderRadius = BorderRadius.zero,
bool animateColor = true,
bool animateShadowColor = true,
Curve curve = Curves.linear,
VoidCallback? onEnd,
}) {
return AnimatedPhysicalModel(
key: key,
shape: shape,
elevation: elevation,
color: color,
shadowColor: shadowColor,
duration: duration,
curve: curve,
onEnd: onEnd,
clipBehavior: clipBehavior,
borderRadius: borderRadius,
animateColor: animateColor,
animateShadowColor: animateShadowColor,
child: this,
);
}