util/inline_tui/inline_tui library
A small library of reusable inline terminal user interface (TUI) components.
The components render and update only their own rows at the bottom of the terminal rather than taking over the full screen, and work across modern Windows consoles (cmd and PowerShell) as well as macOS and Linux terminals.
Classes
- BottomRegionRenderer
- Renders and updates a block of text lines anchored at the bottom of the terminal, without taking over the full screen.
- InlineTerminal
- Abstraction over the terminal used by the inline TUI components.
- ScrollingProcess
- Runs a subprocess and tails its combined stdout/stderr inside a ScrollingSection at the bottom of the terminal.
- ScrollingProcessResult
- The outcome of running a process inside a ScrollingSection.
- ScrollingSection
- A fixed-height scrolling output region anchored at the bottom of the terminal.
- ScrollingSink
- Bridges byte output written to an IOSink into a ScrollingSection.
- SelectList
- A keyboard-navigated, bottom-anchored selection list.
-
SelectListRunner<
T> - Drives a SelectListModel against a InlineTerminal, wiring keyboard input to the model and rendering updates via a BottomRegionRenderer.
- SelectListStyle
- The visual glyphs and color settings used when rendering a select list.
- StdioTerminal
- A InlineTerminal backed by the process standard input and output.
Enums
- AnsiStyle
- Standard ANSI escape code for terminal colors and styles.
- RetainSection
- What to do with the section body when ScrollingSection.finish is called.
Functions
-
fitAnsiToColumns(
String text, int columns, {bool closeStyles = false}) → String -
Truncates
textto at mostcolumns- 1 visible columns, appending an ellipsis when it is clipped.
Typedefs
- SpinnerScheduler = void Function() Function(Duration period, void onTick())
-
Schedules
onTickto be called everyperiod, returning a callback that cancels the scheduled ticking.