Package-level declarations

Types

Link copied to clipboard
abstract class BaseDialogState

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

Link copied to clipboard
Link copied to clipboard
class DialogButton(val text: String = "", val contentColor: Color = Color.Unspecified, val containerColor: Color = Color.Unspecified, val shape: Shape? = null)

a dialog buttons

Link copied to clipboard

an enum for the different dialog button types

Link copied to clipboard
Link copied to clipboard
sealed class DialogEvent

the sealed event for all dialog events (button click and dismissal)

Link copied to clipboard

an enum for the different dialog event types

Link copied to clipboard

an interaction source for button states and option state

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard

convenience type alias for no data dialogs (internal state is Unit, but the overload does not require a data parameter)

Link copied to clipboard
data class DialogStyleDesktopOtions(val dialogTitle: String, val position: WindowPosition, val width: Dp, val height: Dp)
Link copied to clipboard
object DialogUtil
Link copied to clipboard
class StyleOptions(val iconMode: StyleOptions.IconMode = IconMode.CenterTop)

Properties

Link copied to clipboard
actual val DispatcherIO: CoroutineDispatcher
expect val DispatcherIO: CoroutineDispatcher
actual val DispatcherIO: CoroutineDispatcher
actual val DispatcherIO: CoroutineDispatcher
actual val DispatcherIO: CoroutineDispatcher

Functions

Link copied to clipboard
fun Dialog(state: BaseDialogState, title: @Composable () -> Unit? = null, icon: @Composable () -> Unit? = null, style: ComposeDialogStyle = DialogDefaults.defaultDialogStyle(), buttons: DialogButtons = DialogDefaults.buttons(), options: DialogOptions = DialogDefaults.options(), onEvent: (event: DialogEvent) -> Unit = {}, content: @Composable () -> Unit)

Shows a dialog containing some arbitrary content

Link copied to clipboard
actual fun DialogContentScrollableColumn(modifier: Modifier, content: ColumnScope.() -> Unit)
expect fun DialogContentScrollableColumn(modifier: Modifier = Modifier, content: @Composable ColumnScope.() -> Unit)
actual fun DialogContentScrollableColumn(modifier: Modifier, content: ColumnScope.() -> Unit)
actual fun DialogContentScrollableColumn(modifier: Modifier, content: ColumnScope.() -> Unit)
actual fun DialogContentScrollableColumn(modifier: Modifier, content: ColumnScope.() -> Unit)
Link copied to clipboard
actual fun DialogContentScrollableLazyColumn(modifier: Modifier, state: LazyListState, contentPadding: PaddingValues, reverseLayout: Boolean, verticalArrangement: Arrangement.Vertical, horizontalAlignment: Alignment.Horizontal, flingBehavior: FlingBehavior, userScrollEnabled: Boolean, content: LazyListScope.() -> Unit)
expect fun DialogContentScrollableLazyColumn(modifier: Modifier = Modifier, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, verticalArrangement: Arrangement.Vertical = if (!reverseLayout) Arrangement.Top else Arrangement.Bottom, horizontalAlignment: Alignment.Horizontal = Alignment.Start, flingBehavior: FlingBehavior = ScrollableDefaults.flingBehavior(), userScrollEnabled: Boolean = true, content: LazyListScope.() -> Unit)
actual fun DialogContentScrollableLazyColumn(modifier: Modifier, state: LazyListState, contentPadding: PaddingValues, reverseLayout: Boolean, verticalArrangement: Arrangement.Vertical, horizontalAlignment: Alignment.Horizontal, flingBehavior: FlingBehavior, userScrollEnabled: Boolean, content: LazyListScope.() -> Unit)
actual fun DialogContentScrollableLazyColumn(modifier: Modifier, state: LazyListState, contentPadding: PaddingValues, reverseLayout: Boolean, verticalArrangement: Arrangement.Vertical, horizontalAlignment: Alignment.Horizontal, flingBehavior: FlingBehavior, userScrollEnabled: Boolean, content: LazyListScope.() -> Unit)
actual fun DialogContentScrollableLazyColumn(modifier: Modifier, state: LazyListState, contentPadding: PaddingValues, reverseLayout: Boolean, verticalArrangement: Arrangement.Vertical, horizontalAlignment: Alignment.Horizontal, flingBehavior: FlingBehavior, userScrollEnabled: Boolean, content: LazyListScope.() -> Unit)
Link copied to clipboard
fun <T : Any> dialogStateOf(data: T?, buttonPositiveEnabled: Boolean = true, buttonNegativeEnabled: Boolean = true, dismissAllowed: Boolean = true, swipeAllowed: Boolean = true, onStateChanged: (T?) -> Unit? = null): DialogState<T>
fun dialogStateOf(visible: Boolean = false, buttonPositiveEnabled: Boolean = true, buttonNegativeEnabled: Boolean = true, dismissAllowed: Boolean = true, swipeAllowed: Boolean = true, onStateChanged: (visible: Boolean) -> Unit? = null): DialogStateNoData

creates a DialogState object for usage outside of Compose (e.g. ViewModel)

Link copied to clipboard
Link copied to clipboard
fun rememberDialogState(visible: Boolean = false, buttonPositiveEnabled: Boolean = true, buttonNegativeEnabled: Boolean = true, dismissAllowed: Boolean = true, swipeAllowed: Boolean = true): DialogStateNoData
fun <T : Any> rememberDialogState(data: T?, saver: Saver<MutableState<T?>, out Any> = autoSaver(), buttonPositiveEnabled: Boolean = true, buttonNegativeEnabled: Boolean = true, dismissAllowed: Boolean = true, swipeAllowed: Boolean = true): DialogState<T>

returns a DialogState object holding all necessary states for the dialog

Link copied to clipboard
actual fun stringOk(): String
expect fun stringOk(): String
actual fun stringOk(): String
actual fun stringOk(): String
actual fun stringOk(): String
Link copied to clipboard
fun DialogDefaults.styleWindowsDialog(dialogTitle: String, position: WindowPosition = WindowPosition(Alignment.Center), width: Dp = 800.dp, height: Dp = 600.dp, iconColor: Color = DialogStyleDefaults.iconColor, titleColor: Color = DialogStyleDefaults.titleColor, contentColor: Color = DialogStyleDefaults.contentColor): ComposeDialogStyle