The Flutter renderer for AI output.

Markdown, math and code, perfect while the answer streams.

$flutter pub add gpt_markdown
Playground

Used by Buzz by Block183K downloads a month160/160 pub points

Real GptMarkdown output, recorded · sample answer, figures from the published benchmarks

Why gpt_markdown

The renderer Flutter AI apps ship with. Fast, hard to break, yours to style.

Fast

31×

faster updates while streaming a 12 KB reply, compared with 1.2.1

74×

with SliverGptMarkdown, which lays out only what is on screen

Only the live tail of a streaming reply is rebuilt. Benchmarks

Covers the edge cases

530of 652 CommonMark spec examples pass on every CI run
  • Half-written syntax mid-stream
  • Malformed model output
  • Right-to-left text and math
  • The reader's text size
  • Selection, links and taps
  • Answers that run to pages

Yours to style

One style sheet for the whole reply. Your own widgets inside it.

Headings, links, quotes and code blocks take your theme. Mentions, channels and status pills can be your own Flutter widgets, right inside the text.

Customization docs
The reply with the package defaults: an underlined link, a thin quote bar, the default code block

Every block a model writes.

Formulas are typeset by val_latex and code is highlighted in 55 languages by val_highlight, our own pure-Dart engines.

DemoReal renders
Markdownmath.md
Einstein's relation is \(E = mc^2\). For any \(ax^2 + bx + c = 0\):

\[ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \]
Rendered by GptMarkdownMath docs
Math, rendered from the markdown on the left

Real renders, in a dark theme like this site.

The next step

Your answers already look right. Now let them do something.

Some answers shouldn’t be read, they should be used. Val Generative UI turns them into real components your users can act on, from the team that makes gpt_markdown.

Today · gpt_markdown
A gpt_markdown reply: what if Pro cost more, with a table of price, MRR and churn at $29, $35 and $45, and a note that churn climbs above 3.7% past about $41.
Next · Val Generative UI

Keep gpt_markdown

It still renders the prose. Val adds components to the same reply, in the same Flutter app.

50+ components, your theme

Simulators, approvals, live charts and plots that look like your app, light and dark.

Change them without a release

Publish a new version from the console and installed apps draw it on the next answer.

See Generative UI

Render it today. Make it interactive next.

gpt_markdown is free and stays free. Generative UI is in early access.

See Generative UI Open the playground