WebSocketTerminalBackend constructor

WebSocketTerminalBackend(
  1. WebSocket socket, {
  2. TerminalDimensions initialSize = (width: 80, height: 24),
  3. bool supportsAnsi = true,
  4. bool isTerminal = true,
  5. ColorProfile colorProfile = ColorProfile.trueColor,
  6. ({bool useBackspace, bool useTabs}) movementCaps = (useTabs: false, useBackspace: true),
  7. bool closeSocketOnDispose = true,
})

Creates a websocket-backed backend.

Implementation

WebSocketTerminalBackend(
  this.socket, {
  TerminalDimensions initialSize = const (width: 80, height: 24),
  bool supportsAnsi = true,
  bool isTerminal = true,
  ColorProfile colorProfile = ColorProfile.trueColor,
  ({bool useTabs, bool useBackspace}) movementCaps = const (
    useTabs: false,
    useBackspace: true,
  ),
  this.closeSocketOnDispose = true,
}) : _delegate = JsonTerminalBackend(
       sendMessage: socket.add,
       inboundMessages: socket,
       closeTransport: closeSocketOnDispose ? () => socket.close() : null,
       initialSize: initialSize,
       supportsAnsi: supportsAnsi,
       isTerminal: isTerminal,
       colorProfile: colorProfile,
       movementCaps: movementCaps,
     );