Window.controlled constructor
Window.controlled({
- Widget? title,
- Widget? actions = const WindowActions(),
- Widget? content,
- required WindowController? controller,
Creates a controlled window with behavior managed by a WindowController.
This constructor creates a window whose state (position, size, minimized, maximized) is entirely controlled programmatically through the provided controller. All state properties are null and managed via the controller.
Parameters:
title(Widget?): Title widget for the title baractions(Widget?): Custom action widgets, defaults toWindowActions()content(Widget?): Main content widgetcontroller(WindowController, required): Controller for programmatic management
Example:
Window.controlled(
controller: myWindowController,
title: Text('Controlled Window'),
content: MyContentWidget(),
)
Implementation
Window.controlled({
this.title,
this.actions = const WindowActions(),
this.content,
required this.controller,
}) : bounds = null,
maximized = null,
minimized = null,
alwaysOnTop = null,
resizable = null,
draggable = null,
maximizable = null,
minimizable = null,
enableSnapping = null,
closable = null,
constraints = null;