legacy library

Legacy HTML parser and converter compatibility surface.

This library is deprecated and will be removed in tagflow 2.0. It stays available, unchanged, for every 1.x release. New code should render through the semantic runtime from package:tagflow/tagflow.dart:

  • Tagflow.html(...) or TagflowHtmlAdapter instead of TagflowParser
  • TagflowComponentRegistry instead of ElementConverter
  • TagflowViewOptions instead of TagflowOptions

Classes

BlockquoteConverter
A converter for the blockquote tag.
BlockquoteFooterConverter
Converter for the footer of a blockquote.
CellSpan
Row and column span of a legacy table cell.
CodeConverter
A converter for code elements (code and pre tags)
ContainerConverter
Converts container elements (div, section, article, etc.)
DefaultConverter
Default fallback converter for unknown elements
ElementConverter<T extends TagflowNode>
Base interface for element converters
ElementParser
Parses text nodes and generic elements.
HrConverter
Converter for horizontal rules
ImgConverter
Converter for img elements
ImgParser
Parses img elements.
ListConverter
Converter for ul and ol lists.
ListItemConverter
Converter for li list items.
NodeParser<T extends TagflowNode>
Parses one kind of DOM node for the legacy TagflowParser.
SizeValue
Represents a size value that can be either absolute or relative
StyledContainer
A container that applies TagflowStyle to its child
StyleParser
Utility class to parse CSS-like values into Flutter values
TableCellConverter
Converter for td and th cells.
TableConverter
Converter for table elements.
TableParser
Parses table elements into a padded grid.
Tagflow
Main widget for rendering rich content.
TagflowCodeBlockOptions
View-owned options for rendering code block nodes.
TagflowCodeCopyDetails
Details passed to TagflowCodeCopyCallback.
TagflowCodeHighlightRequest
Source and context passed to a TagflowCodeHighlighter.
TagflowComponentContext
Rendering context passed to semantic component builders.
TagflowComponentRegistry
Registry for mapping semantic Tagflow node kinds to Flutter components.
TagflowContentPolicy
Safe default content policy contract for adapters.
TagflowConverter
Main converter that orchestrates the conversion process
TagflowDocument
Immutable source-agnostic rich-content document for Tagflow runtime APIs.
TagflowDocumentNode
Immutable semantic node used by the runtime document model.
TagflowDocumentPatch
Immutable structural update operation for a TagflowDocument.
TagflowElement
Represents an HTML element in the tagflow tree.
TagflowHtmlAdapter
Converts HTML input into the native Tagflow runtime document model.
TagflowHtmlDocumentBridge
Transitional bridge from runtime documents into the legacy converter tree.
TagflowHtmlNodeIdStrategy
Configures how the HTML adapter assigns runtime node IDs.
TagflowImgElement
Legacy parsed img element.
TagflowInlineStyle
A small, safe set of text styling carried from the source content, such as the inline style attribute of an HTML element.
TagflowMarkdownAdapter
Converts Markdown (GitHub Flavored) into the native Tagflow runtime document model.
TagflowMarkdownStream
Builds a TagflowDocument incrementally from Markdown that arrives in chunks, such as an AI answer streamed token by token.
TagflowMarkdownStreamUpdate
One update emitted by TagflowMarkdownStream.updates.
TagflowMarkdownStreamView
Renders the current document of a TagflowMarkdownStream and rebuilds as chunks arrive.
TagflowMetadata
Immutable metadata attached to documents, nodes, or source records.
TagflowNativeBlock
Immutable native block payload adapted into the runtime document model.
TagflowNativeBlockAdapter
Adapts typed native blocks into the canonical TagflowDocument model.
TagflowNativeBlockCodec
JSON codec for the native block adapter transport shape.
TagflowNativeBlockDocument
Immutable document envelope for native blocks.
TagflowNativeBlockPatch
Immutable native block update operation adapted into runtime document patches.
TagflowNativeBlockPatchEnvelope
Ordered native block patch envelope with producer revision tokens.
TagflowNode
Base type of the legacy parsed node tree.
TagflowNodeIds
Stable path-based ID helpers for runtime document nodes.
TagflowNodeTapDetails
Details passed to TagflowNodeTapCallback.
TagflowOptions
Legacy compatibility wrapper for runtime view options.
TagflowParser
Parses HTML string into TagflowElement
TagflowPresentation
Immutable presentation hints carried by adapters into the runtime layer.
TagflowRenderBoundary
Boundary that limits rendering when matched while parsing the HTML tree.
TagflowRenderTheme
Typed styling for the built-in components of the runtime renderer.
TagflowRenderThemeScope
Provides a TagflowRenderTheme to the Tagflow content below it.
TagflowScope
Scope for providing options to descendants
TagflowSelectableAdapter
A widget that wraps the child with selectable functionality.
TagflowSelectableOptions
Options for configuring the selectable behavior of the Tagflow widget
TagflowSourceInfo
Source location and adapter metadata for a document or node.
TagflowStyle
Style configuration for HTML elements
TagflowTableElement
Legacy parsed table element.
TagflowTagPolicyDecision
Result of a tag policy check.
TagflowTheme
A theme that provides default styles for all HTML elements in Tagflow.
TagflowThemeProvider
Provides theme to descendant widgets
TagflowUrlPolicyDecision
Result of a URL policy check.
TagflowViewOptions
Options for configuring the Tagflow widget
TextConverter
Converter for text elements

Enums

AlignContent
Defines how flex items are aligned along the cross axis
AlignItems
Defines how flex items are aligned along the cross axis
Display
Defines the display type of an element
FlexDirection
Defines the flex direction of a flex container
FlexWrap
Defines how flex items wrap
JustifyContent
Defines how flex items are aligned along the main axis
SizeUnit
Represents different types of size units
TagflowCalloutTone
Tone of a TagflowNodeKind.callout, which picks its accent colour.
TagflowContentLimit
Content policy limits an adapter can hit while adapting input.
TagflowDisplay
How a node takes part in layout.
TagflowImageSelectionBehavior
Behavior for selecting images
TagflowInlineSemantic
Source-agnostic inline text semantics that affect presentation.
TagflowMarkdownRawHtmlBehavior
How TagflowMarkdownAdapter treats raw HTML embedded in Markdown.
TagflowNativeBlockKind
Semantic native block kinds supported by the block adapter contract.
TagflowNativeBlockPatchKind
Semantic native update kinds supported by the patch adapter slice.
TagflowNodeKind
Semantic runtime node kinds for Tagflow documents.
TagflowResourceType
Source URL categories evaluated by the content policy.
TagflowSourceKind
High-level source kinds that can produce a Tagflow document.
TagflowTagDecisionReason
Reasons a tag decision may be rejected.
TagflowTextAlign
Horizontal text alignment requested by the source content.
TagflowTextDecoration
Text decoration lines requested by the source content.
TagflowUnsupportedBehavior
Runtime behavior for unsupported content.
TagflowUrlDecisionReason
Reasons a URL decision may be rejected.

Extensions

AlignItemsExtensions on AlignItems
Conversions from AlignItems.
FlexTypeExtensions on FlexDirection
Extension methods for converting style enums to Flutter types
JustifyContentExtensions on JustifyContent
Conversions from JustifyContent.
StyleExtension on TagflowStyle
Helpers that turn a TagflowStyle into Flutter decorations.
TagflowDocumentQueries on TagflowDocument
Query and validation helpers for TagflowDocument.
TagflowDocumentUpdates on TagflowDocument
Immutable update helpers for TagflowDocument.
TagflowHtmlNodeMetadata on TagflowDocumentNode
Read-only node metadata exposed by the HTML adapter.
TagflowMarkdownNodeMetadata on TagflowDocumentNode
Read-only node metadata exposed by the Markdown adapter.
TagflowNativeBlockDocumentMetadata on TagflowDocument
Read-only document metadata exposed by the native block adapter.
TagflowNativeBlockNodeMetadata on TagflowDocumentNode
Read-only node metadata exposed by the native block adapter.
Link-related extensions for TagflowNode
TagflowNodePosition on TagflowNode
Position-related extensions for TagflowNode
TagflowNodeSize on TagflowNode
Size-related extensions for TagflowNode
TagflowNodeStyle on TagflowNode
Style-related extensions for TagflowNode

Typedefs

ErrorWidgetBuilder = TagflowErrorWidgetBuilder
Legacy widget-level error builder typedef.
TagflowCodeCopyCallback = void Function(TagflowCodeCopyDetails details)
Callback invoked after a code block's source was copied to the clipboard.
TagflowCodeHighlighter = TextSpan? Function(BuildContext context, TagflowCodeHighlightRequest request)
Extension point that turns code block source into styled text spans.
TagflowComponentBuilder = Widget Function(TagflowComponentContext context, TagflowDocumentNode node)
Builds a Flutter widget for a semantic Tagflow document node.
TagflowErrorWidgetBuilder = Widget Function(BuildContext context, Object? error)
Error widget builder for handling parsing and rendering failures.
TagflowImageSelectionTextBuilder = String? Function(TagflowDocumentNode image, BuildContext context)
Builds the text an image contributes to a selection.
TagflowLinkTapCallback = void Function(String url, LinkedHashMap<String, String>? attributes)
Callback for handling link taps
TagflowNodeTapCallback = void Function(TagflowNodeTapDetails details)
Callback for handling taps on opted-in semantic document nodes.