NudgeState
Defines the state for managing and displaying nudges.
It includes configurations for the maximum stack size, animation, placement, and the coroutine scope used for managing nudge-related coroutines.
Functions
Link copied to clipboard
fun NudgeState.custom(duration: Duration = NudgeDuration.Persistent, style: Style = Style.Default, content: NudgeLayout)
Displays a customizable nudge with the specified parameters.
Link copied to clipboard
Displays a new nudge with the provided NudgeModel.
Link copied to clipboard
Provides a DSL for creating and displaying nudges.
Link copied to clipboard
fun NudgeState.error(title: String, description: String? = null, actions: List<NudgeButton> = emptyList(), duration: Duration = NudgeDuration.Persistent, style: Style = Style.Default)
Displays an error nudge with the specified parameters.
Link copied to clipboard
fun NudgeState.info(title: String, description: String? = null, actions: List<NudgeButton> = emptyList(), duration: Duration = NudgeDuration.Persistent, style: Style = Style.Default)
Displays an info nudge with the specified parameters.
Link copied to clipboard
fun NudgeState.loading(title: String, description: String? = null, actions: List<NudgeButton> = emptyList(), duration: Duration = NudgeDuration.Persistent, style: Style = Style.Default)
Displays a loading nudge with the specified parameters.
Link copied to clipboard
Renders the current list of nudges in the UI.
Link copied to clipboard
Validates the current NudgeState to ensure that it is correctly configured.
Link copied to clipboard
fun NudgeState.success(title: String, description: String? = null, actions: List<NudgeButton> = emptyList(), duration: Duration = NudgeDuration.Persistent, style: Style = Style.Default)
Displays a success nudge with the specified parameters.
Link copied to clipboard
fun NudgeState.warning(title: String, description: String? = null, actions: List<NudgeButton> = emptyList(), duration: Duration = NudgeDuration.Persistent, style: Style = Style.Default)
Displays a warning nudge with the specified parameters.