AnimatedPhysicalModelModifier constructor

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

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.

Implementation

const AnimatedPhysicalModelModifier({
  super.key,
  super.child,
  super.curve,
  required super.duration,
  super.onEnd,
  super.modifierKey,
  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,
});