AppDialog class

A Material Design dialog component.

Provides a customizable dialog with title, content, and actions.

Inheritance

Constructors

AppDialog({Key? key, String? title, Widget? content, List<Widget>? actions, Widget? icon, EdgeInsets? contentPadding, bool showCloseButton = false, Color? backgroundColor, double? borderRadius, TextStyle? titleStyle, TextStyle? contentStyle, double? elevation, Color? shadowColor})
Creates a dialog.
const

Properties

actions List<Widget>?
Action buttons displayed at the bottom.
final
backgroundColor Color?
Optional background color.
final
borderRadius double?
Optional border radius.
final
content Widget?
The content widget of the dialog.
final
contentPadding EdgeInsets?
Padding for the content area.
final
contentStyle TextStyle?
Optional text style for the content.
final
elevation double?
Optional elevation.
final
hashCode int
The hash code for this object.
no setterinherited
icon Widget?
Optional icon displayed above the title.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowColor Color?
Optional shadow color.
final
showCloseButton bool
Whether to show a close icon in the top-right corner.
final
title String?
Optional title of the dialog.
final
titleStyle TextStyle?
Optional text style for the title.
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

Static Methods

show<T>({required BuildContext context, String? title, Widget? content, List<Widget>? actions, Widget? icon, bool barrierDismissible = false, bool showCloseButton = false, Color? backgroundColor, double? borderRadius, TextStyle? titleStyle, TextStyle? contentStyle, double? elevation, Color? shadowColor}) Future<T?>
Shows a dialog with the given configuration.
showConfirmation({required BuildContext context, required String title, required String message, String confirmLabel = 'Confirm', String cancelLabel = 'Cancel', AppButtonVariant confirmVariant = AppButtonVariant.primary, AppButtonVariant cancelVariant = AppButtonVariant.ghost, bool showCloseButton = false, bool showCancelButton = true, bool barrierDismissible = false, Color? backgroundColor, double? borderRadius, TextStyle? titleStyle, TextStyle? contentStyle, double? elevation, Color? shadowColor}) Future<bool?>
Shows a confirmation dialog with customizable OK/Cancel buttons.