ServiceSession class
Everything the TUI draws for one service.
A ChangeNotifier because the pane rebuilds from it: the process feeds
ingest as bytes arrive, and the render loop reads lines and state.
Constructors
- ServiceSession(ServicePlan plan, {int maxLines = defaultMaxLines})
Properties
- baseUrl → String?
-
The address this service announced it is listening on, exactly as it
wrote it — or null until it has announced one.
no setter
- exitCode → int?
-
The code the process exited with, or null while it is still running.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDead → bool
-
Whether the process behind this service is gone. See ServiceStateLife.
no setter
- isLive → bool
-
Whether the pane is following the live end.
no setter
- label → String
-
no setter
-
lines
→ List<
ServiceLogLine> -
What the pane draws: the settled lines, then whatever each stream is
part way through drawing.
no setter
- maxLines → int
-
The cap on retained lines. Oldest are evicted first.
final
- name → String
-
no setter
- plan → ServicePlan
-
final
- port → int
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollTop → int?
-
Where the pane's top visible row is, or null while it follows the tail.
no setter
- state → ServiceState
-
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object notifies its listeners.
inherited
-
clear(
) → void - Empties the pane, because someone asked for it to be empty.
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
ingest(
String chunk, {required bool isError}) → void - Feeds one write from the child's stdout or stderr.
-
markExited(
int code) → void - Records that the process is gone.
-
markRestarted(
) → void - Puts the session back to how it looked before its first line, because a new process is about to write into it.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered listener.
inherited
-
scrollBy(
int delta, {required int viewport}) → void -
Moves the view by
deltarows, freezing it away from the live end. -
scrollToLive(
) → void - Snaps the pane back to the newest line and re-sticks it there.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- defaultMaxLines → const int
- How many settled lines are kept per service — the pane's scrollback depth, since the oldest line reachable by scrolling is the oldest line still kept.