CountingAnsiSink class
An AnsiSink that categorizes every write into an AnsiByteBreakdown, keeping both a running total and (optionally) a per-frame list.
AnsiRenderer.renderDiff flushes each frame to the sink in exactly one
write call (and only when the frame is non-empty), so each entry in
frames corresponds to one emitted frame's byte budget.
Optionally wraps an inner sink so the same bytes can still reach a real destination — making this usable for live byte telemetry against a real terminal, not just offline analysis.
- Implemented types
Constructors
- CountingAnsiSink([AnsiSink? inner])
- keepFrames retains a per-frame breakdown list (for offline analysis). Set it false for long-running production telemetry, where only the running total and frameCount are needed and an unbounded list would grow without limit.
- CountingAnsiSink.aggregate([AnsiSink? inner])
Properties
- frameCount → int
-
Number of non-empty frames written.
no setter
-
frames
→ List<
AnsiByteBreakdown> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inner → AnsiSink?
-
final
- keepFrames → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- total ↔ AnsiByteBreakdown
-
getter/setter pair
Methods
-
flush(
) → Future< void> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void -
toString(
) → String -
A string representation of this object.
inherited
-
write(
String data) → void -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited