WindowState class

Complete state configuration for a window instance.

Encapsulates all aspects of a window's current state including position, size, visual state (minimized, maximized), capabilities (resizable, draggable), and behavior settings (snapping, always on top).

Key Properties:

Used primarily with WindowController to manage window state programmatically and provide reactive updates to window appearance and behavior.

Example:

WindowState(
  bounds: Rect.fromLTWH(100, 100, 800, 600),
  resizable: true,
  draggable: true,
  enableSnapping: true,
  constraints: BoxConstraints(minWidth: 400, minHeight: 300),
)

Constructors

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

Properties

alwaysOnTop → bool
final
bounds → Rect
final
closable → bool
final
constraints → BoxConstraints
final
draggable → bool
final
enableSnapping → bool
final
hashCode → int
The hash code for this object.
no setteroverride
maximizable → bool
final
maximized → Rect?
final
minimizable → bool
final
minimized → bool
final
resizable → bool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({ValueGetter<Rect>? bounds, ValueGetter<bool>? minimized, ValueGetter<bool>? alwaysOnTop, ValueGetter<bool>? closable, ValueGetter<bool>? resizable, ValueGetter<bool>? draggable, ValueGetter<bool>? maximizable, ValueGetter<bool>? minimizable, ValueGetter<bool>? enableSnapping, ValueGetter<BoxConstraints>? constraints}) → WindowState
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
withMaximized(Rect? maximized) → WindowState

Operators

operator ==(Object other) → bool
The equality operator.
override