Skip to Content

Dialog

A modal overlay dialog with a title, optional body content, and action buttons. The dialog is centered on a dimmed full-screen backdrop. Tapping the backdrop invokes OnDismiss when BarrierDismissible is true. Visibility is controlled by the caller mounting or unmounting this element.

Constructor

Dialog

Creates a Dialog element.

ParameterDescription
titleThe heading text. Must not be null.
contentThe optional body element.
actionsAction buttons as (label, callback) pairs.
onDismissCallback invoked when dismissal is requested.
barrierDismissibleWhether tapping the backdrop triggers .
keyAn optional key for reconciliation identity.

Properties

Actions

Action buttons rendered at the bottom of the dialog. Each entry is a (label, callback) pair.

BarrierDismissible

When true, tapping the backdrop invokes OnDismiss. Defaults to true.

Content

The optional body element displayed between the title and actions.

OnDismiss

Callback invoked when the user requests dismissal via the backdrop or a cancel action.

Title

The heading text displayed at the top of the dialog panel.

Methods

Build

Last updated on