Skip to content

devaryakjha/tagflow

Repository files navigation

Tagflow

Tagflow

Native rich content runtime for Flutter apps, with HTML support through a first-party adapter.

Documentation · tagflow · tagflow_table


CI

Beta1.0.0-beta.0 is the first feature-rich native runtime prerelease. APIs may still change before 1.0.0.

What is this?

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.

Packages

  • tagflow - core runtime, HTML adapter, native block transport, content policy, and rendering APIs
  • tagflow_table - first-party table extension for semantic TagflowDocument table nodes and legacy HTML table compatibility
  • examples/tagflow - example Flutter app and benchmark host

Install

dependencies:
  tagflow: ^1.0.0-beta.0

Add semantic table support when needed:

dependencies:
  tagflow: ^1.0.0-beta.0
  tagflow_table: ^1.0.0-beta.0

Usage

Render HTML through the adapter entry point:

Tagflow.html(html: htmlContent);

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(...).

Stable Channel

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.

Development

dart pub get
dart run melos bootstrap
dart run melos run validate

Common commands:

dart run melos run analyze
dart run melos run test
dart run melos run format
dart run melos run publish:dry-run

Project Structure

packages/tagflow/             Core runtime and HTML adapter
packages/tagflow_table/       First-party table extension
packages/tagflow_benchmarks/  Benchmark and release-gate tooling
examples/tagflow/             Example app, routes, and profile host
docs/                         Specs, migration notes, and release evidence

Releases

Package publication is handled by GitHub Actions tag workflows:

  • tagflow-v* publishes packages/tagflow
  • tagflow_table-v* publishes packages/tagflow_table

Run dart run melos run publish:dry-run before cutting tags.

License

MIT

About

Native rich content runtime for flutter apps, with html rendering, trusted json documents, and live content patches

Topics

Resources

License

Contributing

Stars

20 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors