flutter_smooth_markdown_editor_experimental library
Experimental Markdown editor model helpers.
Import this library when you need Markdown document codec access or other
low-level editor model helpers that are still evolving. The main
flutter_smooth_markdown.dart entry point exports the supported editor
widgets, controller, semantic document, selection, and transaction APIs.
Classes
- AdmonitionNode
- AST node representing an admonition block (callout/alert)
- AdmonitionPlugin
- Plugin for parsing admonition blocks (callouts/alerts)
- ArtifactBuilder
- Builder for AI-generated artifact blocks
- ArtifactNode
- AST node representing an AI-generated artifact
- ArtifactPlugin
- Plugin for parsing AI-generated artifact blocks
- BlockMathBuilder
- Builder for block math nodes (display LaTeX formulas)
- BlockMathNode
- Represents a block math node (display LaTeX formula)
- BlockParseResult
- Result of a block parsing operation
- BlockParserPlugin
- Plugin for parsing block-level markdown elements
- BlockquoteNode
- Represents a blockquote node
- BoldNode
- Represents a bold (strong) text node
- BuilderRegistry
- Registry for Markdown widget builders
- CodeBlockNode
- Represents a code block node
- DetailsBuilder
- Builder for details/summary collapsible blocks
- DetailsNode
- Represents a details/summary collapsible block
- EdgeStyle
- Style configuration for an edge
- EmojiNode
- AST node representing an emoji shortcode
- EmojiPlugin
- Plugin for parsing :emoji: shortcodes in markdown
- EnhancedBlockquoteBuilder
- Enhanced builder for blockquote nodes with icon and gradient
- EnhancedCodeBlockBuilder
- Enhanced builder for code block nodes with copy button and language tag
- EnhancedHeaderBuilder
- Enhanced builder for header nodes with decorative elements
- EnhancedLinkBuilder
- Enhanced builder for link nodes with hover effects
- EnhancedMermaidBuilder
- Enhanced Mermaid builder with additional features
- FlowchartPainter
- Painter for flowchart diagrams
- FlowchartParser
- Parser for Mermaid flowchart diagrams
- FootnoteDefinitionNode
- Represents a footnote definition node
- FootnoteReferenceNode
- Represents a footnote reference node
- GanttChartColors
- Default color palette for Gantt charts
- GanttChartData
- Data for a complete Gantt chart
- GanttChartLayout
- Layout engine for Gantt charts
- GanttPainter
- Painter for Gantt chart diagrams
- GanttParser
- Parser for Mermaid Gantt chart diagrams
- GanttSection
- Represents a section in a Gantt chart
- GanttTask
- Represents a single task in a Gantt chart
- HardBreakNode
- Represents a hard line break inside inline content.
- HashtagNode
- AST node representing a hashtag (#tag)
- HashtagPlugin
- Plugin for parsing #hashtags in markdown
- HeaderNode
- Represents a header node (H1-H6)
- HorizontalRuleNode
- Represents a horizontal rule (divider)
- ImageNode
- Represents an image node
- InlineCodeNode
- Represents an inline code node
- InlineMathBuilder
- Builder for inline math nodes (LaTeX formulas)
- InlineMathNode
- Represents an inline math node (LaTeX formula)
- InlineParseResult
- Result of an inline parsing operation
- InlineParserPlugin
- Plugin for parsing inline markdown elements
- InteractiveMermaidDiagram
- An interactive Mermaid diagram with pan and zoom support
- ItalicNode
- Represents an italic (emphasis) text node
- KanbanChartColors
- Default color palette for Kanban charts
- KanbanChartData
- Data for a complete Kanban chart
- KanbanChartLayout
- Layout engine for Kanban diagrams
- KanbanColumn
- Represents a column in Kanban board
- KanbanPainter
- Painter for Kanban diagrams
- KanbanParser
- Parser for Mermaid Kanban diagrams
- KanbanTask
- Represents a single task card in Kanban board
- LayoutEngine
- Abstract base class for layout engines
- LinkNode
- Represents a link node
- ListItemNode
- Represents a list item node
- ListNode
- Represents a list node (ordered or unordered)
- MarkdownBlock
- Base class for editable block nodes.
- MarkdownBlockMathBlock
- Display math block.
- MarkdownBlockMathInsertResult
- Result of replacing text with a block math node.
- MarkdownBlockPasteResult
- Result of inserting parsed blocks into a text range.
- MarkdownBlockquoteBlock
- Blockquote block.
- MarkdownCodeBlock
- Fenced code block.
- MarkdownConfig
- Configuration options for Markdown parsing and rendering behavior.
- MarkdownDeleteBackwardResult
- Result of applying a rich-editor backspace at the caret.
- MarkdownDocument
- Editable Markdown document model used by the editor.
- MarkdownDocumentCodec
- Markdown import/export bridge for MarkdownDocument.
- MarkdownDocumentEditor
- Mutable transaction facade over MarkdownDocument.
- MarkdownDocumentPosition
- A plain-text position inside an editable text block.
- MarkdownDocumentSelection
- A document-wide selection between two editable text block positions.
- MarkdownEditorCapabilities
- Configures which built-in editor commands are available.
- MarkdownEditorController
- Controller for Markdown source editing.
- MarkdownEditorCustomBlockContext
- Context passed to MarkdownEditorCustomBlockBuilder.
- MarkdownEditorCustomBlockEditorContext
- Context passed to MarkdownEditorCustomBlockEditorBuilder.
- MarkdownEditorImagePickEvent
- Image picking/insertion lifecycle event.
- MarkdownEditorImageSelection
- Image data returned by SmoothMarkdownEditor.onPickImage.
- MarkdownEditorPerformanceSnapshot
- Lightweight editor performance snapshot for host telemetry.
- MarkdownEditorSlashCommand
- Host-provided slash command that inserts Markdown when selected.
- MarkdownEditorThemeData
- Editor-specific visual styling.
- MarkdownEmphasis
- Emphasis/italic inline node.
- MarkdownFrontmatterBlock
- YAML frontmatter block.
- MarkdownHardBreak
- Hard line break inline node.
- MarkdownHeadingBlock
- Heading block.
- MarkdownHorizontalRuleBlock
- Horizontal rule block.
- MarkdownImage
- Markdown image inline node.
- MarkdownImageBlock
- Standalone image block.
- MarkdownImageBlockInsertResult
- Result of replacing text with a standalone image block.
- MarkdownInlineCode
- Inline code.
- MarkdownInlineMath
- Inline math.
- MarkdownInlineNode
- Base class for editable inline nodes.
- MarkdownInputRuleResult
- Result of applying an as-you-type Markdown input rule.
- MarkdownLink
- Markdown link inline node.
- MarkdownLinkEdit
- Link metadata and full plain-text range returned by link editing queries.
- MarkdownListBlock
- List block.
- MarkdownListIndentResult
- Result of changing a list item's nesting level.
- MarkdownListItem
- Editable list item.
- MarkdownListItemSelection
- A contiguous item selection inside a single editable list.
- MarkdownMermaidBlock
- Mermaid diagram block.
- MarkdownNode
- Base class for all Markdown AST nodes
- MarkdownParagraphBlock
- Paragraph block.
- MarkdownParseCache
- A Least Recently Used (LRU) cache for markdown parsing results.
- MarkdownParser
- Main Markdown parser that combines block and inline parsing
- MarkdownRawBlock
- Raw Markdown block preserved for unsupported or custom AST nodes.
- MarkdownRenderContext
- Context passed to builders during rendering
- MarkdownRenderer
- Main renderer that converts Markdown AST nodes to Flutter widgets.
- MarkdownSelectionTransactionResult
- Result of applying a document-wide selection transaction.
- MarkdownSplitBlockResult
- Result of splitting an editable block at the caret.
- MarkdownStrikethrough
- Strikethrough inline node.
- MarkdownStrong
- Strong/bold inline node.
- MarkdownStyleSheet
- Defines the visual styling for all Markdown elements.
- MarkdownTableBlock
- Editable table block.
- MarkdownTableCellPosition
- A visual position inside one editable table.
- MarkdownTableCellSelection
- A rectangular selection inside a single editable table.
- MarkdownText
- Plain text inline node.
- MarkdownWidgetBuilder
- Base class for building widgets from Markdown nodes
- MarkdownWikilink
- Wikilink inline node.
- MentionNode
- AST node representing a user mention (@username)
- MentionPlugin
- Plugin for parsing @mentions in markdown
- MermaidBuilder
- Builder for rendering Mermaid diagrams in markdown
- MermaidColors
- Default colors for Mermaid diagrams
- MermaidDeviceConfig
- Device-specific configuration
- MermaidDiagram
- A widget that renders Mermaid diagrams using pure Dart/Flutter
- MermaidDiagramData
- Represents a parsed Mermaid diagram
- MermaidDiagramNode
- AST node for Mermaid diagrams
- MermaidEdge
- Represents an edge/connection between nodes
- MermaidNode
- Represents a node in a Mermaid diagram
- MermaidPainter
- Base class for Mermaid diagram painters
- MermaidParser
- Main parser for Mermaid diagrams
- MermaidParseResult
- Result of parsing a Mermaid diagram
- MermaidPlugin
- Plugin for parsing Mermaid code blocks in markdown
- MermaidResponsiveConfig
- Responsive configuration for Mermaid diagrams
- MermaidStyle
- Global style configuration for Mermaid diagrams
- MermaidThemes
- Predefined themes for Mermaid diagrams
- NodeStyle
- Style configuration for a node
- ParagraphNode
- Represents a paragraph node
- ParserPlugin
- Base interface for parser plugins
- ParserPluginRegistry
- Registry for managing parser plugins
- ParseToken
- Result of parsing a token
- PieChartColors
- Default color palette for pie charts
- PieChartData
- Data for a complete pie chart
- PieChartLayout
- Layout engine for pie charts
- PieChartPainter
- Painter for pie chart diagrams
- PieChartParser
- Parser for Mermaid pie chart diagrams
- PieSlice
- Data models for Pie Chart diagrams Represents a single slice in a pie chart
- RadarChartLayout
- Layout engine for Radar charts
- SequenceLayout
- Layout engine for sequence diagrams
- SequenceMessage
- Represents a message in a sequence diagram
- SequencePainter
- Painter for sequence diagrams
- SequenceParser
- Parser for Mermaid sequence diagrams
- SequenceParticipant
- Represents a participant in a sequence diagram
- SimpleLayoutEngine
- Simple layout engine that arranges nodes in a grid-like pattern
- SmoothMarkdown
- A widget that renders Markdown content with high performance and customizable styling.
- SmoothMarkdownEditor
- A Markdown source editor with formatted editing, live preview, and Scratch-inspired commands.
- SmoothSelectionController
- Controller for programmatic text selection in a SmoothSelectionRegion.
- SmoothSelectionRegion
- A thin SelectableRegion adapter that exposes programmatic selection control.
- SmoothSelectionRegionState
- State for SmoothSelectionRegion.
- StreamMarkdown
- A widget that renders Markdown content from a stream in real-time.
- StrikethroughNode
- Represents a strikethrough text node
- Subgraph
- Represents a subgraph container
- SubgraphStyle
- Style for subgraphs
- SugiyamaLayout
- Sugiyama-style hierarchical graph layout algorithm
- TableNode
- Represents a table node
- TableRowNode
- Represents a table row
- TextNode
- Represents a text node in the AST
- ThinkingBuilder
- Builder for AI thinking/reasoning blocks
- ThinkingNode
- AST node representing AI thinking/reasoning content
- ThinkingPlugin
- Plugin for parsing AI thinking/reasoning blocks
- TimelineChartColors
- Default color palette for timeline charts
- TimelineChartData
- Data for a complete timeline chart
- TimelineChartLayout
- Layout engine for timeline diagrams
- TimelineEvent
- Data models for Timeline diagrams Represents a single event in a timeline
- TimelinePainter
- Painter for Timeline diagrams
- TimelineParser
- Parser for Mermaid Timeline diagrams
- TimelineSection
- Represents a section in a timeline
- ToolCallBuilder
- Builder for AI tool/function call blocks
- ToolCallNode
- AST node representing an AI tool/function call
- ToolCallPlugin
- Plugin for parsing AI tool/function call blocks
- WikilinkBuilder
- Renders WikilinkNode inline.
- WikilinkNode
-
AST node for a
[[wikilink]]inline element. - WikilinkPlugin
-
Parser plugin for Scratch-style
[[wikilink]]inline nodes. - XYChartLayout
- Layout engine for XY charts
Enums
- AdmonitionType
- Types of admonition blocks
- ArrowType
- Type of arrow head
- ArtifactType
- Types of artifacts that can be generated
- DeviceType
- Device type for responsive layout
- DiagramDirection
- Direction of the diagram flow
- DiagramType
- Type of diagram
- GanttTaskStatus
- Data models for Gantt Chart diagrams Represents the status of a task
- KanbanPriority
- Priority levels for Kanban tasks
- LineType
- Type of line
- MarkdownEditorCommand
- Editing commands supported by the Markdown editor.
- MarkdownEditorImagePickStatus
- Image picking/insertion lifecycle status reported to host apps.
- MarkdownEditorMode
- Display mode for SmoothMarkdownEditor.
- MarkdownListKind
- List block kind.
- MarkdownTableAlignment
- Table alignment.
- MermaidThemeMode
- Theme modes for Mermaid diagrams
- MessageType
- Types of messages in sequence diagrams
- NodeShape
- Shape types for nodes
- ParticipantType
- Types of participants in sequence diagrams
- TableAlignment
- Table column alignment options
- TokenType
- Token types for lexical analysis
- ToolCallStatus
- Status of a tool call
Functions
-
markdownToHtml(
String markdown) → String - Converts Markdown source to a compact HTML fragment for copy/export actions.
-
markdownToPlainText(
String markdown) → String - Converts Markdown source to a readable plain-text representation.
Typedefs
-
BlockRenderer
= Widget Function(List<
MarkdownNode> nodes) - Function type for rendering block-level nodes
-
InlineRenderer
= Widget Function(List<
MarkdownNode> nodes, TextStyle? baseStyle) - MarkdownEditorCustomBlockBuilder = Widget? Function(BuildContext context, MarkdownEditorCustomBlockContext contextData)
- Builds a host-provided formatted view for a custom Markdown block.
- MarkdownEditorCustomBlockEditorBuilder = Widget? Function(BuildContext context, MarkdownEditorCustomBlockEditorContext contextData)
- Builds a host-provided editor for a custom Markdown block.
-
MarkdownEditorImagePickerCallback
= FutureOr<
MarkdownEditorImageSelection?> Function() - Called when the image command should pick/import an image.
- MarkdownEditorImagePickEventCallback = void Function(MarkdownEditorImagePickEvent event)
- Called when image picking/insertion status changes.
-
MarkdownEditorMarkdownExportCallback
= FutureOr<
void> Function(String markdown) - Called when the export menu requests a Markdown file export.
-
MarkdownEditorMarkdownImportCallback
= FutureOr<
String?> Function() - Called when the editor should import Markdown from a host-provided file.
-
MarkdownEditorPdfExportCallback
= FutureOr<
void> Function(String markdown, String html) - Called when the editor requests a Scratch-style PDF/print export.
- MarkdownEditorPerformanceCallback = void Function(MarkdownEditorPerformanceSnapshot snapshot)
- Called after editor state changes with lightweight performance telemetry.
- MarkdownEditorShortcutCallback = KeyEventResult Function(KeyEvent event, MarkdownEditorController controller)
- Host callback for editor keyboard shortcuts.
-
MarkdownEditorSlashCommandCallback
= FutureOr<
String?> Function(String query) - Called when a custom slash command is selected.
- MarkdownEditorToolbarBuilder = Widget Function(BuildContext context, Widget defaultToolbar)
- Wraps or replaces the default editor toolbar.
- SmoothSelectionContextMenuBuilder = Widget Function(BuildContext context, SmoothSelectionRegionState selectableRegionState)
- Signature for building the text selection context menu of a SmoothSelectionRegion.