DraggableDialog class

A highly customizable dialog widget with a draggable header.

This widget provides a structured layout with a header, content, and footer, each of which can be replaced with a custom widget.

Inheritance

Constructors

DraggableDialog({Key? key, required Widget body, required void onDragUpdate(DragUpdateDetails), Widget? header, Widget? footer, double? width, double? maxHeight, bool expandContent = true, DraggableDialogThemeData? theme})
const

Properties

body Widget
The main content of the dialog. This is the only required part.
final
expandContent bool
Whether the content area should expand to fill the available space within the maxHeight constraint. Defaults to true.
final
The widget to display in the footer, typically for action buttons. If null, the footer is not shown.
final
hashCode int
The hash code for this object.
no setterinherited
The widget to display in the header. If null, the header is not shown. The header is the draggable area of the dialog.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxHeight double?
The maximum height of the dialog.
final
onDragUpdate → void Function(DragUpdateDetails)
The callback for drag updates, which should be applied to the draggable part of the dialog (usually the header).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
theme DraggableDialogThemeData?
The theme to apply to the dialog's components. If not provided, a default theme is created based on the current ThemeData.
final
width double?
The width of the dialog.
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