AspectRatioBuilder constructor

const AspectRatioBuilder({
  1. Key? key,
  2. required double aspectRatio,
  3. required Widget builder(
    1. BuildContext context,
    2. double width,
    3. double height
    ),
})

Constructs an AspectRatioBuilder widget with the given aspect ratio and builder function.

The aspectRatio parameter specifies the desired aspect ratio of the child widget. The builder parameter is a function that builds the child widget and takes the BuildContext, width, and height as arguments.

Implementation

const AspectRatioBuilder({
  Key? key,
  required this.aspectRatio,
  required this.builder,
}) : super(key: key);