Window constructor

Window({
  1. required String title,
  2. required Rect bounds,
  3. required Widget child,
  4. int zIndex = 0,
  5. List<String>? borderChars,
  6. Style borderStyle = Style.empty,
  7. Style titleStyle = Style.empty,
  8. Style backgroundStyle = Style.empty,
  9. FocusNode? focusNode,
  10. void onMouseEvent(
    1. MouseEvent event,
    2. int localX,
    3. int localY
    )?,
  11. void onKeyEvent(
    1. KeyEvent event
    )?,
})

Creates a Window with the specified parameters.

Implementation

Window({
  required this.title,
  required this.bounds,
  required this.child,
  this.zIndex = 0,
  List<String>? borderChars,
  this.borderStyle = Style.empty,
  this.titleStyle = Style.empty,
  this.backgroundStyle = Style.empty,
  FocusNode? focusNode,
  this.onMouseEvent,
  this.onKeyEvent,
}) : borderChars =
         borderChars ?? ['┌', '─', '┐', '│', ' ', '│', '└', '─', '┘'],
     focusNode = focusNode ?? FocusNode(id: title);