AspectRatio constructor

const AspectRatio(
  1. {Key? key,
  2. required double aspectRatio,
  3. Widget? child}
)

Creates a widget with a specific aspect ratio.

The aspectRatio argument must be a finite number greater than zero.

Implementation

const AspectRatio({
  super.key,
  required this.aspectRatio,
  super.child,
}) : assert(aspectRatio > 0.0);