Function

constrainWidth

Constrains a given width value to fit within the bounds of this VolumeConstraints object.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

constrainWidth

Android
public fun VolumeConstraints.constrainWidth(width: Int): Int

Constrains a given width value to fit within the bounds of this VolumeConstraints object.

Parameters

width the width value to constrain.

Returns

the constrained width value, ensuring it's within the minimum and maximum width bounds.