Skip to content

Dialog

A Dialog is a focused interface element that overlays the main content to capture user attention for a specific task or message. It helps users review information, confirm an action, or complete a short input process without leaving the current page.

Use this component when you need to interrupt the flow for a meaningful purpose (e.g., confirmation, announcement, or short form input).

Common alternative names:
Modal, Pop-up Window, Overlay


Basic confirmation dialog with two actions.


Simple error message dialog without actions.


Error dialog with a dismissal action.


Dialog with form input and actions.


Dialog with a small circular image at the top.


Dialog with full-width layout and hero image.


PropertyTypeDescription
heroImageWidget?Optional widget displayed as a banner at the top of the dialog.
titleString?Primary text displayed at the top of the dialog content.
subtitleString?Secondary text displayed below the title.
contentWidget?Custom widget displayed in the dialog’s content area.
primaryLabelString?Text label for the primary action button.
onPrimaryVoidCallback?Callback triggered when the primary button is pressed.
secondaryLabelString?Text label for the optional secondary action button.
onSecondaryVoidCallback?Callback triggered when the secondary button is pressed.
radiusdoubleCorner radius of the dialog container and hero image. Default: 12.
isFullboolMakes the dialog content expand to full width. Default: false.
paddingEdgeInsetsGeometryPadding around the dialog content. Default: EdgeInsets.all(16).
barrierDismissibleboolWhether clicking outside the dialog dismisses it. Default: true.