Modal dialogs with Hux styling and consistent theming
showHuxDialog
function that wraps the dialog in a showDialog
call:
title
- Optional title text displayed in the dialog headersubtitle
- Optional subtitle text displayed below the titlecontent
- The main content widget to display in the dialog bodyactions
- Optional list of action buttons displayed at the bottomvariant
- Visual variant of the dialog (default, destructive, success, warning)size
- Size variant of the dialog (small, medium, large, extraLarge)showCloseButton
- Whether to show a close button in the header (default: true)barrierDismissible
- Whether the dialog can be dismissed by tapping outsideclipBehavior
- How to clip the dialog contentshape
- Custom shape for the dialoginsetPadding
- Padding around the dialog contentHuxTokens.surfaceElevated(context)
HuxTokens.textPrimary(context)
and HuxTokens.textSecondary(context)
HuxTokens.borderPrimary(context)
and HuxTokens.borderSecondary(context)
HuxTokens.shadowColor(context)
with proper opacityChoose the Right Size
Action Button Layout
Content Organization
Accessibility