PtySpec class

Requested pseudo-terminal geometry for an interactive shell.

Travels client→hub→node so the node can allocate a real PTY at this geometry (PtyShellBackend). When no PTY is available the pipe fallback surfaces the same values via the TERM/COLUMNS/LINES environment variables.

Annotations
  • @immutable

Constructors

PtySpec({required String term, required int cols, required int rows})
Creates a PTY spec.
const

Properties

cols int
Terminal width in columns.
final
hashCode int
The hash code for this object.
no setterinherited
rows int
Terminal height in rows.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
term String
The terminal type (e.g. xterm-256color).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resized({required int cols, required int rows}) PtySpec
Returns a copy with new dimensions (used on terminal resize).
toJson() Map<String, dynamic>
Serializes to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Map<String, dynamic> json) PtySpec
Decodes from a JSON map.

Constants

defaults → const PtySpec
A sensible default terminal (80×24, xterm-256color).