RenderPhysicalShape constructor Null safety

RenderPhysicalShape(
  1. {RenderBox? child,
  2. required CustomClipper<Path> clipper,
  3. Clip clipBehavior = Clip.none,
  4. double elevation = 0.0,
  5. required Color color,
  6. Color shadowColor = const Color(0xFF000000)}
)

Creates an arbitrary shape clip.

The color and clipper parameters are required.

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

Implementation

RenderPhysicalShape({
  super.child,
  required CustomClipper<Path> super.clipper,
  super.clipBehavior,
  super.elevation = 0.0,
  required super.color,
  super.shadowColor = const Color(0xFF000000),
}) : assert(clipper != null),
     assert(elevation != null && elevation >= 0.0),
     assert(color != null),
     assert(shadowColor != null);