cAspectRatio method

Widget cAspectRatio(
  1. double ratio
)

Create a widget with a specific aspect ratio.

ratio specifies the desired aspect ratio (width / height).

This extension wraps the widget with an AspectRatio widget, allowing you to set a specific aspect ratio.

Implementation

Widget cAspectRatio(double ratio) => AspectRatio(
      child: this,
      aspectRatio: ratio,
    );