InsetsType

@Stable()
class InsetsType : Insets

Represents the values for a type of insets, and stores information about the layout insets, animating insets, and visibility of the insets.

InsetsType instances are commonly stored in a WindowInsets instance.

Constructors

InsetsType
Link copied to clipboard
fun InsetsType()

Functions

copy
Link copied to clipboard
open fun copy(left: Int = this.left, top: Int = this.top, right: Int = this.right, bottom: Int = this.bottom): Insets
minus
Link copied to clipboard
open operator fun minus(other: Insets): Insets
plus
Link copied to clipboard
open operator fun plus(other: Insets): Insets

Properties

animatedInsets
Link copied to clipboard
val animatedInsets: Insets
The animated insets for this InsetsType.
animationFraction
Link copied to clipboard
var animationFraction: Float
The progress of any ongoing animations, in the range of 0 to 1.
animationInProgress
Link copied to clipboard
val animationInProgress: Boolean
Whether this insets type is being animated at this moment.
bottom
Link copied to clipboard
open override val bottom: Int
The bottom dimension of the insets in pixels.
isVisible
Link copied to clipboard
var isVisible: Boolean
Whether the insets are currently visible.
layoutInsets
Link copied to clipboard
val layoutInsets: Insets
The layout insets for this InsetsType.
left
Link copied to clipboard
open override val left: Int
The left dimension of the insets in pixels.
right
Link copied to clipboard
open override val right: Int
The right dimension of the insets in pixels.
top
Link copied to clipboard
open override val top: Int
The top dimension of the insets in pixels.

Extensions

coerceEachDimensionAtLeast
Link copied to clipboard
fun InsetsType.coerceEachDimensionAtLeast(minimumValue: InsetsType): Insets
Ensures that each dimension is not less than corresponding dimension in the specified minimumValue.
toPaddingValues
Link copied to clipboard
@Composable()
inline fun InsetsType.toPaddingValues(start: Boolean = true, top: Boolean = true, end: Boolean = true, bottom: Boolean = true, additionalHorizontal: Dp = 0.dp, additionalVertical: Dp = 0.dp): PaddingValues
Returns the current insets converted into a PaddingValues.
@Composable()
fun InsetsType.toPaddingValues(start: Boolean = true, top: Boolean = true, end: Boolean = true, bottom: Boolean = true, additionalStart: Dp = 0.dp, additionalTop: Dp = 0.dp, additionalEnd: Dp = 0.dp, additionalBottom: Dp = 0.dp): PaddingValues
Returns the current insets converted into a PaddingValues.