MarkdownOptions class

Configuration options for the Markdown component.

These options allow customization of markdown rendering beyond what RenderConfig provides. For simple cases, the defaults work well.

Constructors

MarkdownOptions({int? width, bool? hasDarkBackground, 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, List<MarkdownBlockHandler> blockHandlers = const <MarkdownBlockHandler>[], String bulletChar = '\u2022', bool hyperlinks = true, String hrChar = '\u2500', int? hrWidth, String checkboxChecked = '[x]', String checkboxUnchecked = '[ ]', int listIndent = 2, bool codeBlockBorder = true, Border? tableBorder, Style? tableHeaderStyle, Style? tableCellStyle, Style? tableBorderStyle, bool syntaxHighlighting = true, AdaptiveChromaTheme? syntaxTheme, ChromaTheme? explicitSyntaxTheme, Border? codeBlockBorderStyle})
Creates markdown options with the given settings.
const

Properties

blockHandlers → List<MarkdownBlockHandler>
Custom handlers for block-level markdown elements.
final
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
explicitSyntaxTheme → ChromaTheme?
Explicit syntax theme (not adaptive).
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?
Background override. If null, uses RenderConfig.hasDarkBackground.
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.
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 → AdaptiveChromaTheme?
Adaptive syntax theme that selects dark/light based on background.
final
tableBorder → Border?
Border style for tables.
final
tableBorderStyle → Style?
Style for table borders.
final
tableCellStyle → Style?
Style for table data cells.
final
tableHeaderStyle → Style?
Style for table header cells.
final
width → int?
Terminal width override. If null, uses RenderConfig.terminalWidth.
final

Methods

copyWith({int? width, bool? hasDarkBackground, 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, AdaptiveChromaTheme? syntaxTheme, ChromaTheme? explicitSyntaxTheme, Border? codeBlockBorderStyle}) → MarkdownOptions
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