KwikToastState

data class KwikToastState(val id: UUID = UUID.randomUUID(), val message: String = "", val type: KwikToastType = KwikToastType.NEUTRAL, val isVisible: Boolean = false, val duration: Long = 4000, val backgroundColor: Color = Color.Unspecified)

The state of the toast.

Parameters

id

: The id of the toast. Used to identify the toast. Set automatically. Don't change it.

message

: The message to display in the toast.

type

: The type of toast to display. Can be KwikToastType.NEUTRAL, KwikToastType.WARNING, KwikToastType.SUCCESS, KwikToastType.ERROR. Default is KwikToastType.NEUTRAL, which uses the primary color from MaterialTheme.colorScheme.

isVisible

: Whether the toast is visible or not.

duration

: The duration to display the toast. Default is 4 seconds.

backgroundColor

: The background color of the toast. Default is MaterialTheme.colorScheme.primary.

Constructors

Link copied to clipboard
constructor(id: UUID = UUID.randomUUID(), message: String = "", type: KwikToastType = KwikToastType.NEUTRAL, isVisible: Boolean = false, duration: Long = 4000, backgroundColor: Color = Color.Unspecified)

Properties

Link copied to clipboard
Link copied to clipboard
val duration: Long = 4000
Link copied to clipboard
val id: UUID
Link copied to clipboard
val isVisible: Boolean = false
Link copied to clipboard
Link copied to clipboard