aspectRatio method

AspectRatio aspectRatio(
  1. double ratio
)

Applies an aspect ratio to the widget.

ratio The aspect ratio (width / height).

Implementation

AspectRatio aspectRatio(double ratio) {
  return AspectRatio(aspectRatio: ratio, child: this);
}