Window class

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

Inheritance
Implementers

Constructors

Window({required String title, required int width, required int height, required Widget child, List<String>? borderChars, Style borderStyle = Style.empty, Style titleStyle = Style.empty, Style backgroundStyle = Style.empty, FocusNode? focusNode, bool showCloseButton = false, void onMouseEvent(MouseEvent event, int localX, int localY)?, void onKeyEvent(KeyEvent event)?, void onPan(int dx, int dy)?, void onResize(int dx, int dy)?})
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
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
height int
The height of the window.
getter/setter pair
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
onPan → void Function(int dx, int dy)?
Callback triggered when the window is dragged.
final
onResize → void Function(int dx, int dy)?
Callback triggered when the window is resized.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showCloseButton bool
Whether to show the close button x on the top right.
final
title String
The title text shown in the window border.
final
titleStyle Style
The style applied to the window title.
final
width int
The width of the window.
getter/setter pair

Methods

createElement() Element
Creates an Element to manage this widget's location in the tree.
override
getIntrinsicHeight(int width) int
Computes the intrinsic height of this widget under the given width constraint.
inherited
getIntrinsicWidth(int height) int
Computes the intrinsic width of this widget under the given height 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
toString() String
A string representation of this object.
inherited

Operators

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