ArtisanalDevTools class
DevTools integration for artisanal TUI programs.
Implements ProgramInterceptor to hook into the program lifecycle and provide Timeline events, service extensions, and live event streaming.
When an existing interceptor is already configured, pass it as inner to compose both:
final recorder = ProgramRenderRecorder();
final devtools = ArtisanalDevTools(inner: recorder);
final program = Program(model, options: ProgramOptions(interceptor: devtools));
- Inheritance
-
- Object
- ProgramInterceptor
- ArtisanalDevTools
Constructors
- ArtisanalDevTools({ProgramInterceptor? inner, int maxLogEntries = _defaultMaxLogEntries, bool enableTimeline = true, bool enablePostEvent = true, bool enableServiceExtensions = true})
- Creates a DevTools bridge.
Properties
- enablePostEvent → bool
-
Whether to emit postEvent for live streaming.
final
- enableServiceExtensions → bool
-
Whether to register VM service extensions.
final
- enableTimeline → bool
-
Whether to emit Timeline events.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inner → ProgramInterceptor?
-
Optional inner interceptor to delegate to.
final
- isRunning → bool
-
Whether the DevTools bridge is currently active.
no setter
- maxLogEntries → int
-
Maximum message log entries to retain.
final
-
messageLog
→ List<
DevToolsMessageEntry> -
Provides read-only access to the message log for testing.
no setter
- renderStats → DevToolsRenderStats
-
Provides read-only access to render stats for testing.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- wantsNativeFrames → bool
-
Whether this interceptor needs native cell snapshots after each render.
no setteroverride
Methods
-
bindOptions(
ProgramOptions options) → void - Called by Program to pass the resolved options for service extension queries. This is set internally and should not be called by consumers.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onProcessed(
Msg msg, Duration elapsed) → void -
Called after a message has been processed.
override
-
onRendered(
{required int renderGeneration, required Object view, required DegradationLevel degradationLevel, required Duration renderDuration, int? width, int? height, TerminalNativeFrame? nativeFrame, TerminalNativeDeltaFrame? nativeDelta, TerminalNativeCellDeltaFrame? nativeCellDelta, List< TerminalNativeSpanDelta> ? nativeSpanDelta}) → void -
Called after a render has completed.
override
-
onSend(
Msg msg) → Msg? -
Called for each message before it is queued.
override
-
onStart(
void send(Msg msg)) → void -
Called once after program initialization.
override
-
onStop(
) → void -
Called during program cleanup.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
updateModelSnapshot(
Object? model) → void -
Updates the cached model string for
ext.artisanal.getState.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited