AnsiRendererOptions class

Configuration options for ANSI markdown rendering.

Provides customizable styles for different markdown elements and various rendering options like terminal width and hyperlink support.

Constructors

AnsiRendererOptions({int? width, bool hasDarkBackground = true, Style? textStyle, Style? h1Style, Style? h2Style, Style? h3Style, Style? h4Style, Style? h5Style, Style? h6Style, Style? emphasisStyle, Style? strongStyle, Style? codeStyle, Style? codeBlockStyle, Style? linkStyle, Style? blockquoteStyle, Color? blockquoteBorderColor, Style? strikethroughStyle, String bulletChar = '\u2022', bool hyperlinks = true, String hrChar = '\u2500', int? hrWidth, String checkboxChecked = '\u2611', String checkboxUnchecked = '\u2610', int listIndent = 2, bool codeBlockBorder = true, Border? tableBorder, Style? tableHeaderStyle, Style? tableCellStyle, Style? tableBorderStyle, bool syntaxHighlighting = true, ChromaTheme? syntaxTheme, Border? codeBlockBorderStyle})
Creates renderer options with the given settings.
const

Properties

blockquoteBorderColor Color?
Color for blockquote border.
final
blockquoteStyle Style?
Style for blockquote text.
final
bulletChar String
Character used for bullet points.
final
checkboxChecked String
Character for checked checkboxes.
final
checkboxUnchecked String
Character for unchecked checkboxes.
final
codeBlockBorder bool
Whether to draw a border around code blocks.
final
codeBlockBorderStyle Border?
Border style for code blocks.
final
codeBlockStyle Style?
Style for code blocks.
final
codeStyle Style?
Style for inline code.
final
emphasisStyle Style?
Style for emphasized (italic) text.
final
h1Style Style?
Style for H1 headings.
final
h2Style Style?
Style for H2 headings.
final
h3Style Style?
Style for H3 headings.
final
h4Style Style?
Style for H4 headings.
final
h5Style Style?
Style for H5 headings.
final
h6Style Style?
Style for H6 headings.
final
hasDarkBackground bool
Whether the terminal has a dark background.
final
hashCode int
The hash code for this object.
no setterinherited
hrChar String
Character used for horizontal rules.
final
hrWidth int?
Width of horizontal rules. If null, uses width or 40.
final
Whether to use OSC 8 hyperlinks for links.
final
linkStyle Style?
Style for links.
final
listIndent int
Number of spaces for list indentation per level.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
strikethroughStyle Style?
Style for strikethrough text.
final
strongStyle Style?
Style for strong (bold) text.
final
syntaxHighlighting bool
Whether to apply syntax highlighting to fenced code blocks.
final
syntaxTheme ChromaTheme?
Theme for syntax highlighting.
final
tableBorder Border?
Border style for tables. If null, uses rounded borders.
final
tableBorderStyle Style?
Style for table borders.
final
tableCellStyle Style?
Style for table data cells.
final
tableHeaderStyle Style?
Style for table header cells.
final
textStyle Style?
Style for normal body/paragraph text.
final
width int?
Terminal width for text wrapping. If null, no wrapping is applied.
final

Methods

copyWith({int? width, bool? hasDarkBackground, Style? textStyle, Style? h1Style, Style? h2Style, Style? h3Style, Style? h4Style, Style? h5Style, Style? h6Style, Style? emphasisStyle, Style? strongStyle, Style? codeStyle, Style? codeBlockStyle, Style? linkStyle, Style? blockquoteStyle, Color? blockquoteBorderColor, Style? strikethroughStyle, String? bulletChar, bool? hyperlinks, String? hrChar, int? hrWidth, String? checkboxChecked, String? checkboxUnchecked, int? listIndent, bool? codeBlockBorder, Border? tableBorder, Style? tableHeaderStyle, Style? tableCellStyle, Style? tableBorderStyle, bool? syntaxHighlighting, ChromaTheme? syntaxTheme, Border? codeBlockBorderStyle}) AnsiRendererOptions
Creates a copy with the given fields replaced.
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