Window constructor

Window({
  1. required String title,
  2. required int width,
  3. required int height,
  4. required Widget child,
  5. List<String>? borderChars,
  6. Style borderStyle = Style.empty,
  7. Style titleStyle = Style.empty,
  8. Style backgroundStyle = Style.empty,
  9. FocusNode? focusNode,
  10. bool showCloseButton = false,
  11. void onMouseEvent(
    1. MouseEvent event,
    2. int localX,
    3. int localY
    )?,
  12. void onKeyEvent(
    1. KeyEvent event
    )?,
  13. void onPan(
    1. int dx,
    2. int dy
    )?,
  14. void onResize(
    1. int dx,
    2. int dy
    )?,
})

Creates a Window with the specified parameters.

Implementation

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