AppDialog class final

Card central de um dialog do design system (a superfície flutuante em si).

É apenas a superfície: uma barra de topo, um child rolável e um footer opcional (ex.: um AppButtonsFooter com as ações). Para exibi-lo como modal (barrier + transição + gestão de foco) use o helper showAppDialog.

A barra de topo é a mesma das sheets (AppSurfaceTopBar): title opcional e botão de fechar em chip circular, ligado por padrão e à direita (end) por padrão. Diferente das sheets, o título é alinhado ao início — no dialog ele é o cabeçalho de um formulário, não o rótulo de um painel. Sem título e sem botão a barra simplesmente não existe (nada de vão vazio). Ela fica fora da rolagem, como o rodapé.

Participa dos eixos globais do DS:

  • Estilo (AppStyle): por ser uma superfície flutuante, o default é elevated (sombra simétrica) — como os demais overlays (AppMenu, AppPopover, AppCard de painel). Sobrescreva por instância via style (outlined troca a sombra por borda outline; filled deixa chapado).
  • Forma (AppRadiusMode): segue o modo de raio global, com override via radiusMode/radius.

Todas as cores vêm do tema (surfaceContainer, outline) → contraste AA em claro/escuro nas duas marcas.

showAppDialog(
  context: context,
  title: const AppText('Excluir veículo?'),
  child: const AppDialogContent(
    message: 'Esta ação não pode ser desfeita.',
    illustration: 'assets/delete.svg',
  ),
  footer: AppButtonsFooter(primary: confirmButton, secondary: cancelButton),
);
Inheritance

Constructors

AppDialog({required Widget child, Widget? footer, String? title, Widget? titleWidget, bool showCloseButton = true, AppSheetCloseSide closeSide = AppSheetCloseSide.end, VoidCallback? onCloseButton, AppStyle? style, bool? glass, AppRadiusMode? radiusMode, BorderRadius? radius, Key? key})
Cria um AppDialog.
const

Properties

child → Widget
Conteúdo do dialog (rolável quando excede a altura disponível).
final
closeSide → AppSheetCloseSide
Lado do botão de fechar. Default end (direita em LTR).
final
Rodapé opcional (ex.: um AppButtonsFooter com Ok/Cancelar).
final
glass → bool?
Override do eixo glass só deste dialog. null segue o global (theme.glassTheme.enabled); true/false força ligado/desligado.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onCloseButton → VoidCallback?
Ação do botão de fechar. null → dá pop na rota.
final
radius → BorderRadius?
Override cru do raio. Vence radiusMode e o modo global.
final
radiusMode → AppRadiusMode?
Override do modo de forma (raio) só deste dialog. null segue o modo global (theme.radiusTheme).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showCloseButton → bool
Mostra o botão de fechar (chip circular). Default true.
final
style → AppStyle?
Tratamento de container (AppStyle) do render não-glass. null (default) resolve para elevated — o padrão dos overlays flutuantes; passe para sobrescrever.
final
title → String?
Título opcional, alinhado ao início da barra de topo.
final
titleWidget → Widget?
Escape hatch para o título que NÃO é só texto (ícone ao lado, título reativo). Aqui a tipografia é de quem passa — a barra não a impõe.
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited