PromptTheme class

Rich styling bundle composing colors, glyphs, and display features.

PromptTheme is the unified styling API for all terminal prompts. It composes three independent concerns:

Use built-in themes or create custom combinations:

// Built-in theme
final theme = PromptTheme.matrix;

// Minimal mode with any color palette
final minimal = PromptTheme(
  colors: TerminalColors.ocean,
  features: DisplayFeatures.minimal,
);

// Full customization
final custom = PromptTheme(
  colors: TerminalColors.arcane,
  glyphs: TerminalGlyphs.rounded,
  features: DisplayFeatures.verbose,
);
Available extensions

Constructors

PromptTheme({TerminalColors colors = TerminalColors.dark, TerminalGlyphs glyphs = TerminalGlyphs.unicode, DisplayFeatures features = DisplayFeatures.standard})
Creates a theme by composing colors, glyphs, and features.
const

Properties

accent → String
Primary accent color.
no setter
arrow → String
Arrow/focus indicator.
no setter
bold → String
ANSI bold sequence.
no setter
boldTitles → bool
Whether to bold titles.
no setter
borderBottom → String
Bottom border character.
no setter
borderConnector → String
Border connector character.
no setter
borderHorizontal → String
Horizontal border character.
no setter
borderTop → String
Top border character.
no setter
borderVertical → String
Vertical border character.
no setter
checkboxOff → String
Checkbox off color.
no setter
checkboxOffSymbol → String
Checkbox off symbol.
no setter
checkboxOn → String
Checkbox on color.
no setter
checkboxOnSymbol → String
Checkbox on symbol.
no setter
colors → TerminalColors
Color palette for ANSI escape sequences.
final
dim → String
ANSI dim sequence.
no setter
error → String
Error color.
no setter
features → DisplayFeatures
Display feature configuration.
final
glyphs → TerminalGlyphs
Glyph set for structural symbols.
final
gray → String
Gray color.
no setter
hashCode → int
The hash code for this object.
no setterinherited
highlight → String
Highlight color for focus.
no setter
hintStyle → HintStyle
Default hint style.
no setter
info → String
Info color.
no setter
inverse → String
Inverse video sequence.
no setter
keyAccent → String
Key accent color for hints.
no setter
reset → String
ANSI reset sequence.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selection → String
Selection color.
no setter
showBorders → bool
Whether to show borders.
no setter
showConnector → bool
Whether to show connector lines.
no setter
useInverseHighlight → bool
Whether to use inverse highlight.
no setter
warn → String
Warning color.
no setter

Methods

copyWith({TerminalColors? colors, TerminalGlyphs? glyphs, DisplayFeatures? features}) → PromptTheme
Creates a copy with modified components.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
withCompatibility(TerminalCompatibility compatibility) → PromptTheme

Available on PromptTheme, provided by the PromptThemeCompatibility extension

Returns this theme adapted for compatibility.

Operators

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

Constants

arcane → const PromptTheme
Arcane theme – mystical ancient tome aesthetic.
compact → const PromptTheme
Compact theme - borders but no hints.
dark → const PromptTheme
Default high-contrast dark theme.
fire → const PromptTheme
Fire theme – high-energy reds/oranges.
matrix → const PromptTheme
Matrix-inspired neon-green theme.
minimal → const PromptTheme
Minimal functional theme - no borders, inline hints.
monochrome → const PromptTheme
Monochrome theme – high-contrast ASCII retro.
neon → const PromptTheme
Neon theme – vibrant synthwave cyberpunk.
ocean → const PromptTheme
Ocean theme – calming blue/cyan tones.
pastel → const PromptTheme
Pastel theme – soft, gentle colors.
phantom → const PromptTheme
Phantom theme – ghostly apparition aesthetic.