EmbeddedTerminalBackend class

Generic embedded backend backed by callbacks and externally supplied streams.

Implemented types

Constructors

EmbeddedTerminalBackend({required void output(String data), Future<void> flushOutput()?, Stream<List<int>>? inputStream, Stream<TerminalDimensions>? resizeStream, Stream<void>? shutdownStream, 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)})
Creates an embedded backend.

Properties

colorProfile ColorProfile
The color capability profile of the target surface.
final
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.
final
movementCaps → ({bool useBackspace, bool useTabs})
final
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
supportsAnsi bool
Whether the backend can interpret ANSI escape sequences.
final

Methods

addInput(List<int> bytes) → void
Pushes input into the backend.
addInputError(Object error, [StackTrace? stackTrace]) → void
Pushes an input-side error into the backend stream.
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
notifySizeChanged(TerminalDimensions size) → void
Pushes a resize event into the backend and updates size.
optimizeMovements() → ({bool useBackspace, bool useTabs})
Host-specific movement optimization hints.
override
requestShutdown() → void
Pushes a shutdown event into the backend.
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