Function

takeOrElse

If this Dp isSpecified then this is returned, otherwise block is executed and its result is returned.

takeOrElse

Source set: Common
public inline fun Dp.takeOrElse(block: () -> Dp): Dp

If this Dp isSpecified then this is returned, otherwise block is executed and its result is returned.

takeOrElse

Source set: Common
public inline fun DpOffset.takeOrElse(block: () -> DpOffset): DpOffset

If this DpOffset isSpecified then this is returned, otherwise block is executed and its result is returned.

takeOrElse

Source set: Common
public inline fun DpSize.takeOrElse(block: () -> DpSize): DpSize

If this DpSize isSpecified then this is returned, otherwise block is executed and its result is returned.

takeOrElse

Source set: Common
public inline fun TextUnit.takeOrElse(block: () -> TextUnit): TextUnit

If this TextUnit isSpecified then this is returned, otherwise block is executed and its result is returned.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: