WindowController constructor

WindowController({
  1. required Rect bounds,
  2. Rect? maximized,
  3. bool minimized = false,
  4. bool focused = false,
  5. bool closable = true,
  6. bool resizable = true,
  7. bool draggable = true,
  8. bool maximizable = true,
  9. bool minimizable = true,
  10. bool enableSnapping = true,
  11. BoxConstraints constraints = kDefaultWindowConstraints,
})

Creates a WindowController.

Parameters:

  • bounds (Rect, required): Initial window bounds.
  • maximized (Rect?, optional): Maximized bounds, or null if not maximized.
  • minimized (bool, default: false): Initial minimized state.
  • focused (bool, default: false): Initial focused state.
  • closable (bool, default: true): Whether window can be closed.
  • resizable (bool, default: true): Whether window can be resized.
  • draggable (bool, default: true): Whether window can be dragged.
  • maximizable (bool, default: true): Whether window can be maximized.
  • minimizable (bool, default: true): Whether window can be minimized.
  • enableSnapping (bool, default: true): Whether window snapping is enabled.
  • constraints (BoxConstraints, default: kDefaultWindowConstraints): Size constraints.

Implementation

WindowController({
  required Rect bounds,
  Rect? maximized,
  bool minimized = false,
  bool focused = false,
  bool closable = true,
  bool resizable = true,
  bool draggable = true,
  bool maximizable = true,
  bool minimizable = true,
  bool enableSnapping = true,
  BoxConstraints constraints = kDefaultWindowConstraints,
}) : super(WindowState(
        bounds: bounds,
        maximized: maximized,
        minimized: minimized,
        alwaysOnTop: focused,
        closable: closable,
        resizable: resizable,
        draggable: draggable,
        maximizable: maximizable,
        minimizable: minimizable,
        enableSnapping: enableSnapping,
        constraints: constraints,
      ));