ConfirmationDefaults

object ConfirmationDefaults


Contains default values used by Confirmation composable.

Summary

Constants

const Long

Default timeout for the Confirmation dialog, in milliseconds.

Public functions

ConfirmationColors

Creates a ConfirmationColors that represents the default colors used in a Confirmation.

ConfirmationColors
@Composable
confirmationColors(
    iconColor: Color,
    iconContainerColor: Color,
    textColor: Color
)

Creates a ConfirmationColors with modified colors used in Confirmation.

CurvedScope.() -> Unit

A default composable that displays text along a curved path, used in Confirmation.

ConfirmationColors

Creates a ConfirmationColors that represents the default colors used in a FailureConfirmation.

ConfirmationColors
@Composable
failureColors(
    iconColor: Color,
    iconContainerColor: Color,
    textColor: Color
)

Creates a ConfirmationColors with modified colors used in FailureConfirmation.

CurvedScope.() -> Unit

Returns a lambda to display a curved failure message.

ConfirmationColors

Creates a ConfirmationColors that represents the default colors used in a SuccessConfirmation.

ConfirmationColors
@Composable
successColors(
    iconColor: Color,
    iconContainerColor: Color,
    textColor: Color
)

Creates a ConfirmationColors with modified colors used in SuccessConfirmation.

CurvedScope.() -> Unit

Returns a lambda to display a curved success message.

Public properties

@Composable BoxScope.() -> Unit

A default composable used in FailureConfirmation that displays a failure icon with an animation.

Dp

Default icon size for the Confirmation with curved content

Dp

Default icon size for the Confirmation with linear content

@Composable BoxScope.() -> Unit

A default composable used in SuccessConfirmation that displays a success icon with an animation.

Constants

ConfirmationDurationMillis

Added in 1.0.0-alpha29
const val ConfirmationDurationMillis = 4000: Long

Default timeout for the Confirmation dialog, in milliseconds.

Public functions

confirmationColors

Added in 1.0.0-alpha29
@Composable
fun confirmationColors(): ConfirmationColors

Creates a ConfirmationColors that represents the default colors used in a Confirmation.

confirmationColors

@Composable
fun confirmationColors(
    iconColor: Color = Color.Unspecified,
    iconContainerColor: Color = Color.Unspecified,
    textColor: Color = Color.Unspecified
): ConfirmationColors

Creates a ConfirmationColors with modified colors used in Confirmation.

Parameters
iconColor: Color = Color.Unspecified

The icon color.

iconContainerColor: Color = Color.Unspecified

The icon container color.

textColor: Color = Color.Unspecified

The text color.

curvedText

Added in 1.0.0-alpha29
@Composable
fun curvedText(
    text: String,
    style: CurvedTextStyle = CurvedTextStyle(MaterialTheme.typography.titleLarge)
): CurvedScope.() -> Unit

A default composable that displays text along a curved path, used in Confirmation.

Parameters
text: String

The text to display.

style: CurvedTextStyle = CurvedTextStyle(MaterialTheme.typography.titleLarge)

The style to apply to the text. Defaults to CurvedTextStyle(MaterialTheme.typography.titleLarge).

failureColors

Added in 1.0.0-alpha29
@Composable
fun failureColors(): ConfirmationColors

Creates a ConfirmationColors that represents the default colors used in a FailureConfirmation.

failureColors

@Composable
fun failureColors(
    iconColor: Color = Color.Unspecified,
    iconContainerColor: Color = Color.Unspecified,
    textColor: Color = Color.Unspecified
): ConfirmationColors

Creates a ConfirmationColors with modified colors used in FailureConfirmation.

Parameters
iconColor: Color = Color.Unspecified

The icon color.

iconContainerColor: Color = Color.Unspecified

The icon container color.

textColor: Color = Color.Unspecified

The text color.

failureText

Added in 1.0.0-alpha29
@Composable
fun failureText(): CurvedScope.() -> Unit

Returns a lambda to display a curved failure message. The failure message is retrieved from the application's string resources.

successColors

Added in 1.0.0-alpha29
@Composable
fun successColors(): ConfirmationColors

Creates a ConfirmationColors that represents the default colors used in a SuccessConfirmation.

successColors

@Composable
fun successColors(
    iconColor: Color = Color.Unspecified,
    iconContainerColor: Color = Color.Unspecified,
    textColor: Color = Color.Unspecified
): ConfirmationColors

Creates a ConfirmationColors with modified colors used in SuccessConfirmation.

Parameters
iconColor: Color = Color.Unspecified

The icon color.

iconContainerColor: Color = Color.Unspecified

The icon container color.

textColor: Color = Color.Unspecified

The text color.

successText

Added in 1.0.0-alpha29
@Composable
fun successText(): CurvedScope.() -> Unit

Returns a lambda to display a curved success message. The success message is retrieved from the application's string resources.

Public properties

FailureIcon

Added in 1.0.0-alpha29
val FailureIcon: @Composable BoxScope.() -> Unit

A default composable used in FailureConfirmation that displays a failure icon with an animation.

IconSize

Added in 1.0.0-alpha29
val IconSizeDp

Default icon size for the Confirmation with curved content

SmallIconSize

Added in 1.0.0-alpha29
val SmallIconSizeDp

Default icon size for the Confirmation with linear content

SuccessIcon

Added in 1.0.0-alpha29
val SuccessIcon: @Composable BoxScope.() -> Unit

A default composable used in SuccessConfirmation that displays a success icon with an animation.