AspectRatioModifierFieldValue

ModifierFieldValue that applies an aspect ratio constraint to a composable.

Parameters

ratio

The aspect ratio value (width/height). For example, 1.0f for square, 16/9f for widescreen.

Constructors

Link copied to clipboard
constructor(ratio: Float)

Types

Link copied to clipboard

Factory for creating AspectRatioModifierFieldValue instances with configurable initial values.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun Builder()

Renders the UI builder interface for configuring this modifier. This composable is typically displayed in the Preview Lab control panel.

Link copied to clipboard
open override fun Modifier.createModifier(): Modifier

Creates a modifier from this field value.

Link copied to clipboard

Combines this modifier field value with another to create a list.