RenderPhysicalModel constructor Null safety

RenderPhysicalModel(
  1. {RenderBox? child,
  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(4278190080)}
)

Creates a rounded-rectangular clip.

The color is required.

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

Implementation

RenderPhysicalModel({
  RenderBox? child,
  BoxShape shape = BoxShape.rectangle,
  Clip clipBehavior = Clip.none,
  BorderRadius? borderRadius,
  double elevation = 0.0,
  required Color color,
  Color shadowColor = const Color(0xFF000000),
}) : assert(shape != null),
     assert(clipBehavior != null),
     assert(elevation != null && elevation >= 0.0),
     assert(color != null),
     assert(shadowColor != null),
     _shape = shape,
     _borderRadius = borderRadius,
     super(
       clipBehavior: clipBehavior,
       child: child,
       elevation: elevation,
       color: color,
       shadowColor: shadowColor,
     );