RenderAspectRatio constructor Null safety

RenderAspectRatio(
  1. {RenderBox? child,
  2. required double aspectRatio}
)

Creates as render object with a specific aspect ratio.

The aspectRatio argument must be a finite, positive value.

Implementation

RenderAspectRatio({
  RenderBox? child,
  required double aspectRatio,
}) : assert(aspectRatio != null),
     assert(aspectRatio > 0.0),
     assert(aspectRatio.isFinite),
     _aspectRatio = aspectRatio,
     super(child);