Window class

A Window widget that acts as an isolated floating frame with borders, titles, Z-indexing, and local content viewports.

Inheritance
Implementers

Constructors

Window({required String title, required Rect bounds, required Widget child, int zIndex = 0, List<String>? borderChars, Style borderStyle = Style.empty, Style titleStyle = Style.empty, Style backgroundStyle = Style.empty, FocusNode? focusNode, void onMouseEvent(MouseEvent event, int localX, int localY)?, void onKeyEvent(KeyEvent event)?})
Creates a Window with the specified parameters.

Properties

backgroundStyle Style
The background style of the window.
final
borderChars List<String>
The characters used to draw the window borders.
final
borderStyle Style
The style applied to the window borders.
final
bounds Rect
The layout boundaries of the window.
getter/setter pair
child Widget
The child widget displayed inside the window.
final
focusNode FocusNode
The focus node representing this window's focus state.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
The optional key for this widget.
finalinherited
onKeyEvent → void Function(KeyEvent event)?
Callback triggered when a keyboard event is routed to this window.
final
onMouseEvent → void Function(MouseEvent event, int localX, int localY)?
Callback triggered when a mouse event hits this window.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String
The title text shown in the window border.
final
titleStyle Style
The style applied to the window title.
final
zIndex int
The Z-index of the window determining stacking order.
getter/setter pair

Methods

createElement() Element
Creates an Element to manage this widget's location in the tree.
inherited
getIntrinsicHeight(int width) int
Computes the intrinsic height of this widget under the given width constraint.
inherited
isPositionOnTitle(int localX, int localY) bool
Returns true if the local coordinates localX and localY lie on the title text.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(Buffer buffer, Rect area) → void
Renders the widget onto the provided buffer within the specified area.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited