aspectRatio method

Widget aspectRatio({
  1. required double aspectRatio,
  2. Key? key,
})

A widget that attempts to size the child to a specific aspect ratio.

Implementation

Widget aspectRatio({
  required double aspectRatio,
  Key? key,
}) {
  return AspectRatio(
    key: key,
    aspectRatio: aspectRatio,
    child: this,
  );
}