Native rich content runtime for Flutter apps, with HTML support through a first-party adapter.
Documentation · tagflow · tagflow_table
Beta —
1.0.0-beta.1adds Markdown, streaming and code block support to the native runtime. APIs may still change before1.0.0.
Tagflow used to be a Flutter HTML renderer. The beta line makes it a native rich content runtime.
Instead of forcing every dynamic screen through HTML, apps can render
structured TagflowDocument content directly, accept trusted JSON from a
backend or AI pipeline, validate it, render native Flutter widgets, and apply
document patches for live content updates.
HTML still works through Tagflow.html(...), but it is now an adapter into
the same runtime instead of the whole model.
tagflow- core runtime, HTML and Markdown adapters, native block transport, content policy, and rendering APIstagflow_table- first-party table extension for semanticTagflowDocumenttable nodes and legacy HTML table compatibilityexamples/tagflow- feature gallery app and benchmark host- Seisei chat example -
AI chat app that streams model answers into
TagflowMarkdownStreamand renders structured output as Tagflow documents
The example app is a gallery of HTML, Markdown and native JSON input, live streaming, document patches, tables and the content policy, in light and dark themes.
dependencies:
tagflow: ^1.0.0-beta.1Add semantic table support when needed:
dependencies:
tagflow: ^1.0.0-beta.1
tagflow_table: ^1.0.0-beta.1A caret constraint on a prerelease accepts every later prerelease, so
flutter pub upgrade moves ^1.0.0-beta.0 apps onto beta.1. Production
apps should pin exact versions (tagflow: 1.0.0-beta.1) and upgrade on
purpose; see the changelog for upgrade notes.
Render HTML through the adapter entry point:
Tagflow.html(html: htmlContent);Render Markdown, such as an AI answer, through the Markdown adapter:
Tagflow.markdown(markdown: answer);Render a native document directly:
final document = TagflowDocument(
id: 'article',
children: [
TagflowDocumentNode.paragraph(
id: 'article.intro',
children: [
TagflowDocumentNode.text(
id: 'article.intro.text',
text: 'Native rich content for Flutter.',
),
],
),
],
);
Tagflow.document(document);Use trusted app-controlled JSON without round-tripping through HTML:
const codec = TagflowNativeBlockCodec();
const adapter = TagflowNativeBlockAdapter();
final nativePayload = codec.decodeDocument(nativeJson);
final document = adapter.adapt(nativePayload);
Tagflow.document(document);Patch envelopes decode through the same codec, adapt with
TagflowNativeBlockAdapter.adaptPatches(...), and apply with
TagflowDocument.applyPatches(...).
0.0.8 remains the stable HTML-renderer line. The stable branch preserves
that pre-native-runtime version for Git users.
main carries the native runtime prerelease line.
dart pub get
dart run melos bootstrap
dart run melos run validateCommon commands:
dart run melos run analyze
dart run melos run test
dart run melos run format
dart run melos run publish:dry-runpackages/tagflow/ Core runtime and HTML adapter
packages/tagflow_table/ First-party table extension
packages/tagflow_benchmarks/ Parser, render and native-transport microbenchmarks
examples/tagflow/ Example app
docs/ Specs and migration notes
Package publication is handled by GitHub Actions tag workflows:
tagflow-v*publishespackages/tagflowtagflow_table-v*publishespackages/tagflow_table
Run dart run melos run publish:dry-run before cutting tags.



