DmMarkdownConfig class

Configuration for DmMarkdown rendering features.

Annotations

Constructors

DmMarkdownConfig({bool enableGfm = true, bool enableKatex = true, bool enableColorChips = true, DmFrontMatterMode frontMatter = DmFrontMatterMode.render, bool breaks = true, bool enableMermaid = false, MermaidRenderOptions mermaidOptions = const MermaidRenderOptions(), bool enableCodeHighlight = true, String? codeTheme, Map<String, Widget Function(Element node, BuildContext context)>? blockBuilders, Map<String, InlineSpan Function(Element node, BuildContext context)>? inlineBuilders})
Creates a markdown configuration with optional feature toggles.
const

Properties

blockBuilders Map<String, Widget Function(Element node, BuildContext context)>?
Custom block-level widget builders keyed by element tag.
final
breaks bool
Convert soft line breaks to visible line breaks. Defaults to true.
final
codeTheme String?
Code highlight theme name (maps to highlighting package themes). If null, automatically selected based on ambient brightness: dark → monokai-sublime, light → github.
final
enableCodeHighlight bool
Enable syntax highlighting in fenced code blocks.
final
enableColorChips bool
Add a visual swatch to inline code containing a complete CSS color.
final
enableGfm bool
Enable GitHub Flavored Markdown extensions (tables, strikethrough, task lists, autolinks).
final
enableKatex bool
Enable KaTeX math rendering for $...$ and $$...$$.
final
enableMermaid bool
Enable Mermaid diagram rendering for ```mermaid code blocks. Defaults to false — when disabled, mermaid blocks render as syntax-highlighted code.
final
frontMatter DmFrontMatterMode
Controls extraction and presentation of initial YAML front matter.
final
hashCode int
The hash code for this object.
no setterinherited
inlineBuilders Map<String, InlineSpan Function(Element node, BuildContext context)>?
Custom inline span builders keyed by element tag.
final
mermaidOptions MermaidRenderOptions
Mermaid render options used when enableMermaid is true.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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