FrameContext class

Context passed to the content callback during frame rendering.

Provides convenient methods for writing styled content lines within the frame. Wraps LineBuilder and RenderOutput together.

Available extensions

Properties

features DisplayFeatures
Shorthand access to features.
no setter
frame FramedLayout
Frame layout for structure.
final
glyphs TerminalGlyphs
Shorthand access to glyphs.
no setter
hashCode int
The hash code for this object.
no setterinherited
lb LineBuilder
LineBuilder for consistent styling.
final
out RenderOutput
The render output to write to.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
theme PromptTheme
Theme for colors and ANSI codes.
final

Methods

boldMessage(String message) → void
Writes a bold message line.
bulletItem(String content, {String bullet = '•'}) → void
Writes a bullet item line: │ • Item text
checkboxItem(String content, {required bool focused, required bool checked}) → void
Writes a checkbox item line with arrow and checkbox.
checkboxList<T>(List<T> items, {required int focusedIndex, required Set<int> checkedIndices, int startIndex = 0, String itemBuilder(T item)?}) → void
Writes a list of checkbox items.
checkboxWindow<T>(ListWindow<T> window, {required int focusedIndex, required Set<int> checkedIndices, String itemBuilder(T item)?}) → void
Renders a checkbox list from a ListWindow.
customItem(String content, {required bool focused, String? leadingGlyph, bool highlighted = false}) → void
Writes an item line with custom leading glyph.
dimMessage(String message) → void
Writes a dimmed/muted message line.
emptyLine() → void
Writes an empty line.
emptyMessage(String message) → void
Writes an empty message line (│ (message)).
equation({required String leftLabel, required String leftValue, required String rightLabel, required String rightValue, String direction = '→'}) → void
Writes an equation/conversion line: │ Label value → Label = value
errorMessage(String message) → void
Writes an error message line.
fillerLine({String? char}) → void
Writes a blank line with optional filler character.
gutterEmpty() → void
Writes an empty gutter line (│).
gutterLine(String content) → void
Writes a line with the gutter prefix (│ content).
headerLine(String key, String value) → void
Writes a key-value header line: │ Key: Value (key is accent, value is normal)
highlightedLine(String content, {bool highlighted = false, bool includeGutter = true}) → void
Writes a line with optional inverse highlight.
infoLine(List<String> segments, {int spacing = 3}) → void
Writes a mode/info status line with multiple segments.
infoMessage(String message) → void
Writes an info message line.
inputLine(String text, {bool showCursor = true, String? placeholder}) → void
Writes an input line with cursor: │ ▶ cursor
keyValue(String key, String value, {String separator = '='}) → void
Writes a key-value pair line with colored value: │ key = value
labeledAccent(String label, String value) → void
Writes a labeled value with accent color on the value.
labeledValue(String label, String value, {bool dimLabel = true}) → void
Writes a labeled value line: │ Label: Value
line(String content) → void
Writes a plain line (no gutter).
listWindow<T>(ListWindow<T> window, {required int selectedIndex, required void renderItem(T item, int absoluteIndex, bool isFocused)}) → void
Renders a ListWindow with selection and custom rendering.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
numberedItem(int number, String content) → void
Writes a numbered item line: │ 1. Item text
numericScale(int value, int max) → void

Available on FrameContext, provided by the ValuePromptRendering extension

Renders numeric scale display.
overflowIndicator() → void
Writes an overflow indicator line (│ ...).
progressBar(double ratio, {int width = 20, String filledChar = '█', String emptyChar = '░', bool showPercent = true}) → void
Writes a progress bar line: │ ████████░░░░ 75%
searchLine(String query, {bool enabled = true}) → void
Writes a search input line: │ Search: query
sectionHeader(String name) → void
Writes a section header line: ├─ SectionName
selectableItem(String content, {required bool focused}) → void
Writes a selectable item line with arrow indicator.
selectableItemWithPrefix(String content, {required bool focused, required String prefix}) → void
Writes a custom selectable item with a prefix before the content.
selectionList<T>(List<T> items, {required int selectedIndex, int startIndex = 0, String itemBuilder(T item)?}) → void
Writes a list of items with selection indicator.
selectionWindow<T>(ListWindow<T> window, {required int selectedIndex, String itemBuilder(T item)?}) → void
Renders a simple selection list from a ListWindow.
separatorLine({int width = 20}) → void
Writes a separator line within the frame: │ ──────────
sliderBar(double ratio, {int width = 28, String filledChar = '█', String emptyChar = '·', String? headChar, bool showPercent = false, num? value, String unit = ''}) → void

Available on FrameContext, provided by the ValuePromptRendering extension

Renders a slider bar with head indicator.
starsDisplay(int value, int maxStars, {String filledStar = '★', String emptyStar = '☆'}) → void

Available on FrameContext, provided by the ValuePromptRendering extension

Renders star rating display.
statItem(String label, String value, {String icon = '•', StatTone tone = StatTone.accent}) → void
Writes a stat item line with icon: │ ✔ Label: Value
styledMessage(String message, {String icon = 'ℹ', StatTone tone = StatTone.info, bool bold = false}) → void
Writes a styled message line with icon: │ ℹ Message
summaryLine(int count, int total, {List<String>? highlights}) → void
Writes a summary/count line: │ count/total • item1, item2, ...
tooltipLine(String hint) → void
Writes a tooltip/help hint line: │ (press Enter to continue)
toString() String
A string representation of this object.
inherited
treeBranch(String content, {bool isLast = false}) → void
Writes a tree branch item: │ ├─ Item
warnMessage(String message) → void
Writes a warning message line.
writeBottom() → void
Writes the bottom border line.
writeConnector() → void
Writes a connector line (├─────).
writeTop() → void
Writes the top border line with optional bold styling.

Operators

operator ==(Object other) bool
The equality operator.
inherited