TerminiceComponentContext class

Execution context for a custom TerminiceComponent.

The terminal is captured after the owning terminice instance is activated. All terminal, input, output, and fallback accessors use that captured terminal, so components can stay stable even if global TerminalContext changes while they are running.

Properties

configuration TerminiceConfig
Immutable configuration for terminice.
final
hashCode int
The hash code for this object.
no setterinherited
input TerminalInput
Input stream from the captured terminal.
final
output TerminalOutput
Output stream from the captured terminal.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldUseFallback bool
Whether this context should use line-mode fallback.
final
terminal Terminal
Terminal captured immediately after terminice was activated.
final
terminice Terminice
The configured Terminice instance that created this context.
final
theme PromptTheme
Effective prompt theme for terminice.
final

Methods

activate() → void
Reinstalls the captured terminal as the global active terminal.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
runWithFallback<T>({required T interactive(), required T fallback()}) → T
Runs either interactive or fallback using this context's fallback decision.
toString() String
A string representation of this object.
inherited
withActiveTerminal<T>(T run()) → T
Runs run with the captured terminal installed as active.
withActiveTerminalAsync<T>(FutureOr<T> run()) Future<T>
Runs asynchronous run with the captured terminal installed as active.

Operators

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