TerminalGlyphs class

Glyph set for structural terminal elements.

TerminalGlyphs focuses purely on the characters and symbols that form the prompt scaffold (box drawing, arrows, checkboxes, etc.). Use built-in presets or create custom glyph sets for different terminal capabilities.

// Use rounded corners
final theme = PromptTheme(glyphs: TerminalGlyphs.rounded);

// ASCII-only for maximum compatibility
final theme = PromptTheme(glyphs: TerminalGlyphs.ascii);

// Custom glyph set
final custom = TerminalGlyphs(
  borderTop: '╭',
  arrow: '❯',
);

Constructors

TerminalGlyphs({String borderTop = '┌', String borderBottom = '└', String borderVertical = '│', String borderConnector = '├', String borderHorizontal = '─', String arrow = '▶', String checkboxOnSymbol = '■', String checkboxOffSymbol = '□'})
Creates a glyph set for prompts.
const

Properties

arrow → String
Icon rendered before focusable rows to indicate direction/focus.
final
borderBottom → String
Box-drawing character used for the bottom edge of the prompt container.
final
borderConnector → String
Character that connects vertical borders to child sections.
final
borderHorizontal → String
Horizontal line character for borders.
final
borderTop → String
Box-drawing character used for the top edge of the prompt container.
final
borderVertical → String
Box-drawing character used for the vertical edges of the prompt.
final
checkboxOffSymbol → String
Symbol for unselected checkboxes or toggles.
final
checkboxOnSymbol → String
Symbol for selected checkboxes or toggles.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({String? borderTop, String? borderBottom, String? borderVertical, String? borderConnector, String? borderHorizontal, String? arrow, String? checkboxOnSymbol, String? checkboxOffSymbol}) → TerminalGlyphs
Creates a copy with modified properties.
matchingCorner(String leftCorner) → String
Returns the matching right corner for a given left corner glyph.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

arcane → const TerminalGlyphs
Mystical/arcane aesthetic with unique symbols.
ascii → const TerminalGlyphs
Pure ASCII for maximum terminal compatibility.
dotted → const TerminalGlyphs
Dotted/dashed vertical lines for a lighter feel.
double → const TerminalGlyphs
Double-line borders for a bold, classic look.
heavy → const TerminalGlyphs
Heavy/thick box drawing characters.
minimal → const TerminalGlyphs
Minimal arrow and simple checkbox symbols.
phantom → const TerminalGlyphs
Phantom/ghost aesthetic with floating corners.
rounded → const TerminalGlyphs
Rounded corners for a softer aesthetic.
unicode → const TerminalGlyphs
Default Unicode box drawing characters.