DialogState

a dialog state holding the current state and the some additional state DialogInteractionSource of the dialog

Parameters

state

the state of the dialog - if not null, the dialog is visible, otherwise not

interactionSource

the DialogInteractionSource holding other states for this dialog

onBeforeShow

the callback that will be called before showing this dialog, providing the data that will be shown in this dialog

onShow

the callback that will be called when this dialog is shown, providing the data that is shown in this dialog

onDismiss

the callback that will be called when this dialog is dismissed

Properties

Link copied to clipboard
val data: T?
Link copied to clipboard

the DialogInteractionSource holding other states for this dialog

Link copied to clipboard
open override val visible: Boolean

the showing state of the dialog

Functions

Link copied to clipboard

this will dismiss this dialog (if the interactionSource (DialogInteractionSource.dismissAllowed) does allow this)

Link copied to clipboard
fun dismissable(enabled: Boolean)

make dialog dismissable or not

Link copied to clipboard
fun enableButton(button: DialogButtonType, enabled: Boolean)

enable or disable a button

Link copied to clipboard

this will determine if a button currently can be pressed

Link copied to clipboard
open override fun onDismiss()
Link copied to clipboard
fun requireData(): T & Any
Link copied to clipboard
fun show(data: T)