constrainWidth
Source set: Common
fun Constraints.constrainWidth(width: Int) = width.fastCoerceIn(minWidth, maxWidth)
Takes a width and returns the closest size to it that satisfies the constraints.
Takes a width and returns the closest size to it that satisfies the constraints.
Compose Multiplatform
Ship iOS, desktop, and web apps with Compose
RevenueCat
Add subscriptions to your apps in minutes
fun Constraints.constrainWidth(width: Int) = width.fastCoerceIn(minWidth, maxWidth)
Takes a width and returns the closest size to it that satisfies the constraints.
Last updated: