PhysicalModel constructor

const PhysicalModel({
  1. Key? key,
  2. BoxShape shape = BoxShape.rectangle,
  3. Clip clipBehavior = Clip.none,
  4. BorderRadius? borderRadius,
  5. double elevation = 0.0,
  6. required Color color,
  7. Color shadowColor = const Color(0xFF000000),
  8. Widget? child,
})

Creates a physical model with a rounded-rectangular clip.

The color is required; physical things have a color.

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

Implementation

const PhysicalModel({
  super.key,
  this.shape = BoxShape.rectangle,
  this.clipBehavior = Clip.none,
  this.borderRadius,
  this.elevation = 0.0,
  required this.color,
  this.shadowColor = const Color(0xFF000000),
  super.child,
}) : assert(elevation >= 0.0);