KwikToastState

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

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.