Kwik Toast State
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.
is Visible
: Whether the toast is visible or not.
duration
: The duration to display the toast. Default is 4 seconds.
background Color
: The background color of the toast. Default is MaterialTheme.colorScheme.primary.