WebSocketTerminalBackend class final

WebSocket-backed backend that speaks the terminal bridge JSON protocol.

Use this when a remote/browser host exchanges structured JSON bridge messages over a websocket instead of raw terminal bytes.

Implemented types

Constructors

WebSocketTerminalBackend(WebSocket socket, {TerminalDimensions initialSize = (width: 80, height: 24), bool supportsAnsi = true, bool isTerminal = true, ColorProfile colorProfile = ColorProfile.trueColor, ({bool useBackspace, bool useTabs}) movementCaps = (useTabs: false, useBackspace: true), bool closeSocketOnDispose = true})
Creates a websocket-backed backend.

Properties

closeSocketOnDispose bool
Whether the websocket should be closed when the backend is disposed.
final
colorProfile ColorProfile
The color capability profile of the target surface.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
inputStream Stream<List<int>>?
Stream of raw input bytes, if the backend accepts input.
no setteroverride
isRawMode bool
Whether raw mode is currently enabled.
no setteroverride
isTerminal bool
Whether the backend is connected to a real terminal-like surface.
no setteroverride
resizeStream Stream<TerminalDimensions>?
Stream of terminal resize events, if the backend can emit them.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shutdownStream Stream<void>?
Stream of shutdown/interrupt events, if the backend can emit them.
no setteroverride
size TerminalDimensions
Current terminal dimensions.
no setteroverride
socket WebSocket
The connected websocket.
final
supportsAnsi bool
Whether the backend can interpret ANSI escape sequences.
no setteroverride

Methods

disableRawMode() → void
Disables raw input mode.
override
dispose() → void
Disposes backend resources.
override
enableRawMode() RawModeGuard
Enables raw input mode.
override
flush() Future<void>
Flushes any buffered backend output.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
optimizeMovements() → ({bool useBackspace, bool useTabs})
Host-specific movement optimization hints.
override
toString() String
A string representation of this object.
inherited
writeRaw(String data) → void
Writes raw terminal data immediately.
override

Operators

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