Package-level declarations

Types

Link copied to clipboard
interface Cancellable
Link copied to clipboard
@Serializable
value class Density(val rawDensity: Double)

Represents a device's display density.

Link copied to clipboard
@Serializable
value class Dp(val value: Double)

Represents a density-independent pixel value. Values will be scaled and converted into standard pixel values according to the device's density.

Link copied to clipboard
Link copied to clipboard
@Serializable
class Margin(val start: Dp = 0.dp, val end: Dp = 0.dp, val top: Dp = 0.dp, val bottom: Dp = 0.dp)
Link copied to clipboard
abstract class OnBackPressedCallback(enabled: Boolean)
Link copied to clipboard
Link copied to clipboard
@Serializable
value class Px(val value: Double)

Represents a raw pixel value in the host's native coordinate system units.

Link copied to clipboard
@Serializable
class Size(val width: Dp, val height: Dp)

A two-dimensional size measured in density-independent pixels.

Link copied to clipboard
@Serializable
class UiConfiguration(val darkMode: Boolean = false, val safeAreaInsets: Margin = Margin.Zero, val viewportSize: Size? = null, val density: Double = 1.0, val layoutDirection: LayoutDirection = LayoutDirection.Ltr)

Properties

Link copied to clipboard

iOS's coordinate system accounts for density automatically.

Link copied to clipboard

Create a Dp from a Double.

Create a Dp from a Float.

Create a Dp from an Int.

Functions

Link copied to clipboard
fun Density(resources: Resources): Density

Create a Density from the device's Resources.

Link copied to clipboard

Convert device-specific density-independent pixel value into a device-agnostic density-independent pixel value.

Link copied to clipboard
fun Margin(all: Dp = 0.dp): Margin
fun Margin(horizontal: Dp = 0.dp, vertical: Dp = 0.dp): Margin
Link copied to clipboard

Convert device-agnostic density-independent pixel value into a device-specific density-independent pixel value.