TerminalOutputRegion
Shows captured stdout and stderr (a LogBuffer) as a LogRegion:
filterable, copyable rows that follow new output, with stderr lines styled
as errors.
Import: package:fleury/fleury.dart, or package:fleury/fleury_core.dart in browser code.
// In a terminal app, runApp captures stdout and stderr into the LogBuffer// this widget reads by default. Anywhere else, including the browser, feed// one yourself:final buffer = LogBuffer(capacity: 500) ..add(const LogLine(r'$ dart test', LogSource.stdout)) ..add(const LogLine('warning: unused import', LogSource.stderr));
TerminalOutputRegion(buffer: buffer)Details
Section titled “Details”By default it reads the LogBuffer from the nearest LogBufferScope,
which runApp provides in a terminal app; pass buffer to show another.
For a minimal tail view without filtering or copy, use
OutputCaptureView.
Constructors
Section titled “Constructors”TerminalOutputRegion()
Section titled “TerminalOutputRegion()”| Parameter | Type | Default | Description |
|---|---|---|---|
buffer: | LogBuffer? | — | Runtime output buffer to render; defaults to the ambient LogBufferScope. |
controller: | LogRegionController? | — | External selection and tail-follow controller. |
focusNode: | FocusNode? | — | Focus node used by the rendered log region. |
autofocus: | bool | false | Whether the rendered log region should request focus when mounted. |
semanticLabel: | String | 'Terminal output' | Semantic label (the accessibility name; not rendered) for the output region. |
showPrefix: | bool | true | Whether each row starts with an [INFO stdout] or [ERROR stderr] prefix. |
maxLineLength: | int? | 1000 | Cuts each output line to this many characters, with no ellipsis, on screen and when copied; null never cuts. The prefix doesn’t count. |
filter: | LogRegionFilterDescriptor? | — | Optional filter applied to captured output rows. |
copySelection: | bool | true | Whether Ctrl+C (and the semantic copy action) copies the output line under the cursor. |
copyOptions: | LogRegionCopyOptions | const LogRegionCopyOptions() | Clipboard/export options for copied output. |
onCopy: | void Function(LogRegionCopyResult result)? | — | Called after a copy attempt completes. |
Source
Section titled “Source”TerminalOutputRegion is defined in packages/fleury/lib/src/catalog/terminal_output_region.dart.
Category: Agent surfaces · All widgets