EdgeInsets

@Serializable
data class EdgeInsets(var top: Int, var left: Int, var bottom: Int, var right: Int)

Represents inset distances from each edge of a rectangular area.

This class is typically used to describe padding, margins, or safe-area–like offsets for screens or view layouts.

All values are expressed in pixels.

Constructors

Link copied to clipboard
constructor(top: Int, left: Int, bottom: Int, right: Int)

Properties

Link copied to clipboard
var bottom: Int

The inset from the bottom edge.

Link copied to clipboard
var left: Int

The inset from the left edge.

Link copied to clipboard
var right: Int

The inset from the right edge.

Link copied to clipboard
var top: Int

The inset from the top edge.

Functions

Link copied to clipboard
fun set(insets: EdgeInsets)

fun set(top: Int, left: Int, bottom: Int, right: Int)

Updates all inset values at once.