WindowWidget constructor
const
WindowWidget({
- Key? key,
- Widget? title,
- Widget? actions,
- Widget? content,
- double? titleBarHeight,
- double? resizeThickness,
- bool resizable = true,
- bool draggable = true,
- bool closable = true,
- bool maximizable = true,
- bool minimizable = true,
- bool enableSnapping = true,
- required Rect bounds,
- Rect? maximized,
- bool minimized = false,
- BoxConstraints constraints = kDefaultWindowConstraints,
Creates a window with direct state management.
All window state properties (bounds, minimized, etc.) are managed
directly through widget properties. State changes require rebuilding
the widget with new property values.
Parameters:
title: Title bar contentactions: Action buttons area contentcontent: Main window contenttitleBarHeight: Custom title bar height (optional)resizeThickness: Custom resize border thickness (optional)resizable: Enable resizing (defaults totrue)draggable: Enable dragging (defaults totrue)closable: Enable closing (defaults totrue)maximizable: Enable maximizing (defaults totrue)minimizable: Enable minimizing (defaults totrue)enableSnapping: Enable edge snapping (defaults totrue)bounds: Initial window bounds (required)maximized: Initial maximized bounds (optional)minimized: Start minimized (defaults tofalse)constraints: Size constraints (defaults to kDefaultWindowConstraints)
Implementation
const WindowWidget({
super.key,
this.title,
this.actions,
this.content,
this.titleBarHeight,
this.resizeThickness,
bool this.resizable = true,
bool this.draggable = true,
bool this.closable = true,
bool this.maximizable = true,
bool this.minimizable = true,
bool this.enableSnapping = true,
required Rect this.bounds,
this.maximized,
bool this.minimized = false,
BoxConstraints this.constraints = kDefaultWindowConstraints,
}) : controller = null;