SessionViewScreen class

The interactive terminal view: opens (or resumes) a shell session on a node and drives it with a WebShellHost (prompt, echo, line editing over the shared InteractiveShellController) wired to an xterm.js terminal.

A sessionRef of new opens a fresh shell; any other value resumes that session. The terminal factory and session opener are injectable so the screen can be tested without xterm.js or a real socket.

Implemented types

Constructors

SessionViewScreen(AppContext ctx, String nodeId, String sessionRef, {TerminalView terminalFactory(HTMLElement host)?, Future<ShellSessionPort> opener(int cols, int rows)?, ClipboardReader? clipboardRead, ClipboardWriter? clipboardWrite})
Builds the screen. Production callers omit the injected hooks.

Properties

clipboardRead ClipboardReader
Reads the clipboard for the Paste key (injectable in tests).
final
clipboardWrite ClipboardWriter
Writes the clipboard for the Copy key (injectable in tests).
final
ctx AppContext
final
element ↔ HTMLElement
The screen's root element.
latefinaloverride-getter
hashCode int
The hash code for this object.
no setterinherited
nodeId String
Node id from the route.
final
opener Future<ShellSessionPort> Function(int cols, int rows)
Opens the session and returns it (a RemoteSession, which is a ShellSessionPort), given the terminal geometry.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionRef String
Session ref from the route (new for a fresh shell).
final
terminalFactory TerminalView Function(HTMLElement host)
Builds the terminal surface inside the given host element.
final

Methods

dispose() → void
Releases subscriptions/resources. Called before the screen is unmounted.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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