Skip to main content

Aspect Ratio

About-Aspect-Ratio

Overview

The Aspect Ratio is the width-to-height ratio of the screen or component. The Aspect Ratio layout widget sizes the child widget as per the given aspect ratio. Aspect ratio accommodates a single child. However, you may add another layout like a Column to the Aspect Ratio layout to add multiple widgets.

Use Cases

  • Aspect Ratio layout has rectangular shape.
  • It can be used to resize and reposition the child widgets.

Properties

  • If the Aspect Ratio is 1, it means the layout is a perfect square with equal width and height. If it is greater than 1, the height reduces and the layout becomes a rectangle. If it is less than 1, the width reduces and the layout becomes a rectangle with a vertical column.
  • Drag the child widget from the widgets panel to the Properties panel or onto the Screen.