Dialog
Android
Component in Wear Material 3 Compose
A base dialog component used by [AlertDialog] and [ConfirmationDialog] variations. This dialog provides a full-screen experience with custom entry/exit animations.
Dialogs provide important prompts in a user flow. They can require an action, communicate information, or help users accomplish a task.
The caller should consider whether timeText or scrollIndicator are needed on this dialog, in this case they should provide that in their content by using ScreenScaffold (with suitable scrollState if that's required).
Last updated:
Installation
dependencies {
implementation("androidx.wear.compose:compose-material3:1.0.0-alpha32")
}
Overloads
@Composable
fun Dialog(
visible: Boolean,
onDismissRequest: () -> Unit,
modifier: Modifier = Modifier,
properties: DialogProperties = DialogProperties(),
content: @Composable () -> Unit,
)
Parameters
name | description |
---|---|
visible | A boolean value that determines whether the dialog should be displayed. |
onDismissRequest | A lambda function to be called when the dialog is dismissed by swiping right. |
modifier | Modifier to be applied to the dialog content. |
properties | An optional [DialogProperties] object for configuring the dialog's behavior. |
content | A composable function that defines the content of the dialog. |