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
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- DraggableDialog
Constructors
- DraggableDialog({Key? key, required Widget body, required void onDragUpdate(DragUpdateDetails), Widget? header, double? width, double? height, double? maxHeight, bool expandContent = true, DraggableDialogThemeData? theme, bool scrollable = true, bool resizable = false, IconData? resizeHandleIcon, double? resizeHandleIconSize})
-
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
maxHeightconstraint. Defaults totrue.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
- header → Widget?
-
The widget to display in the header. If null, the header is not shown.
The header is the draggable area of the dialog.
final
- height → double?
-
The preferred height 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
- resizable → bool
-
Whether the dialog can be resized via a handle in the footer.
final
- resizeHandleIcon → IconData?
-
Icon shown as the resize handle when resizable is enabled.
final
- resizeHandleIconSize → double?
-
Size of the resize handle icon when resizable is enabled.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollable → bool
-
Whether the body should be wrapped in a SingleChildScrollView. Defaults to
true.final - 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
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< DraggableDialog> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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