withMaximized method

WindowState withMaximized(
  1. Rect? maximized
)

Creates a copy of this state with only the maximized bounds changed.

This is a specialized version of copyWith that only modifies the maximized property while preserving all other state values.

Parameters:

  • maximized: New maximized bounds, or null to restore window

Returns a new WindowState with updated maximized property.

Implementation

WindowState withMaximized(Rect? maximized) {
  return WindowState(
    bounds: bounds,
    minimized: minimized,
    alwaysOnTop: alwaysOnTop,
    closable: closable,
    resizable: resizable,
    draggable: draggable,
    maximizable: maximizable,
    minimizable: minimizable,
    enableSnapping: enableSnapping,
    constraints: constraints,
    maximized: maximized,
  );
}