PhysicalShapeModifier constructor

const PhysicalShapeModifier({
  1. Key? key,
  2. Widget? child,
  3. Key? modifierKey,
  4. required CustomClipper<Path> clipper,
  5. Clip clipBehavior = Clip.none,
  6. double elevation = 0.0,
  7. required Color color,
  8. Color shadowColor = const Color(0xFF000000),
})

Creates a physical model with an arbitrary shape clip.

The color is required; physical things have a color.

The clipper, elevation, color, clipBehavior, and shadowColor must not be null. Additionally, the elevation must be non-negative.

Implementation

const PhysicalShapeModifier({
  super.key,
  super.child,
  super.modifierKey,
  required this.clipper,
  this.clipBehavior = Clip.none,
  this.elevation = 0.0,
  required this.color,
  this.shadowColor = const Color(0xFF000000),
}) : assert(elevation >= 0.0);