Terminal constructor

Terminal({
  1. required String websocketUrl,
  2. TerminalController? controller,
  3. String title = 'Terminal',
  4. Object height = 400,
  5. bool showToolbar = true,
  6. bool autoConnect = true,
  7. bool autoReconnect = true,
  8. Duration reconnectDelay = const Duration(seconds: 2),
  9. bool sendResizeMessages = true,
  10. int fontSize = 13,
  11. String fontFamily = 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
  12. int scrollback = 5000,
  13. TerminalTheme theme = const TerminalTheme(),
  14. String connectingMessage = 'Connecting to terminal...',
  15. String scriptUrl = 'https://cdn.jsdelivr.net/npm/xterm@5.3.0/lib/xterm.js',
  16. String stylesheetUrl = 'https://cdn.jsdelivr.net/npm/xterm@5.3.0/css/xterm.css',
  17. String? className,
  18. Map<String, Object?> props = const {},
  19. Map<String, Object?> style = const {},
  20. DartStyle? dartStyle,
  21. void onConnectionStateChanged(
    1. TerminalConnectionState state
    )?,
  22. void onInput(
    1. String data
    )?,
  23. void onOutput(
    1. String data
    )?,
  24. void onResize(
    1. int columns,
    2. int rows
    )?,
  25. void onError(
    1. Object error
    )?,
})

Creates an interactive WebSocket terminal.

Implementation

Terminal({
  required this.websocketUrl,
  this.controller,
  this.title = 'Terminal',
  this.height = 400,
  this.showToolbar = true,
  this.autoConnect = true,
  this.autoReconnect = true,
  this.reconnectDelay = const Duration(seconds: 2),
  this.sendResizeMessages = true,
  this.fontSize = 13,
  this.fontFamily =
      'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
  this.scrollback = 5000,
  this.theme = const TerminalTheme(),
  this.connectingMessage = 'Connecting to terminal...',
  this.scriptUrl = 'https://cdn.jsdelivr.net/npm/xterm@5.3.0/lib/xterm.js',
  this.stylesheetUrl =
      'https://cdn.jsdelivr.net/npm/xterm@5.3.0/css/xterm.css',
  this.className,
  this.props = const {},
  this.style = const {},
  this.dartStyle,
  this.onConnectionStateChanged,
  this.onInput,
  this.onOutput,
  this.onResize,
  this.onError,
});