# Val: the site, in full > The visual layer for AI agents: Output Rendering, Generative UI and Live Scenes for Flutter. This file is the current text of useval.ai's public pages, as Markdown, generated from the pages themselves. A shorter overview is at https://useval.ai/llms.txt. Company: Plusfinity AI, Inc., New York, NY. Contact: info@useval.ai. Docs: https://useval.ai/docs/ · Release history: https://useval.ai/changelog · Source: https://github.com/useval ## Home URL: https://useval.ai/ ### The visual layer for AI agents Turn agent answers into interactive scenes, inside your product. - PUB.DEV 209K monthly downloads of gpt_markdown, our open-source renderer - USED BY Buzz by Block renders its AI answers with gpt_markdown - QUALITY 160/160 pub points: pub.dev's full score for docs, analysis and platform support - OUR OWN APP 500K+ installs of Plusfinity, where every Val layer ships first USE CASES #### Every answer can be a scene. Pick a case. The text answer turns into the live Val version. THE PLATFORM #### One platform, three layers. Rendering, components and live scenes, each built on the one below. #### Agents already know the answer. Val gives them a way to show it, narrate it and let people steer it. - How it flows - Narration - Two-way control STREAMS AS IT PLANS agent → tool call plan → scene graph scene → your app → tool_call explain_concept plan 4 steps scene lattice · 32 nodes YOUR PRODUCT #### Drop it into your product. Your theme, your data rules, a few lines of code. The scene takes your product’s colors, type and corner radius. Switch it while it runs. - Midnight Dark dashboard - Daylight Light admin app - Your brand Sample: a health app BUILT FOR AGENTS #### Agent and user share one scene. Either one can move it. Both see why. PRICING #### Simple pricing. Free to start, usage-based after. ##### Free open-source base gpt_markdown, val_latex and val_highlight are free on pub.dev. No access needed. ##### Pay per minute Val is usage-based: you pay for the minutes of visuals it generates. ##### Playback included Replaying a scene and interacting with it are included in the price. ##### Volume pricing Your rate improves as usage grows. Enterprise adds commitments and SLAs. #### The visual layer for AI agents. Built on renderers developers already trust. Ready for your agents. --- ## Val Generative UI URL: https://useval.ai/components EARLY ACCESS Generative UI ### Ship new UI without shipping your app. Live components for your AI. Change them any time, no release. What happens if we raise Pro to $35? ✦ Chose pricing_simulator Here’s the trade-off. Move the price: 1. ✓ You ask in your app 2. ✓ Your AI picks a component, fills values 3. Val draws it native, on brand BUILD OR BUY #### Building it is easy. Running it is the work. Drawing a card from a tool call takes an afternoon. Then come new components on every platform, an app release for every change, rebrands, malformed values and old app versions. That is what Val takes off your plate. Already built your own? We’ll walk through moving it over, component by component. 01 · SHIP WITHOUT SHIPPING #### Change it today. No app release. Components live on Val, not in your app bundle. Edit one, test it on staging and publish it: apps already on people’s phones draw the new version on the next answer. - Layout, bindings, actions and theme change without an SDK update - Drafts, staging and production for every component - Roll back in one step, or pin an app to a version 1. Draft 2. Staging 3. Production 02 · 50+ COMPONENTS #### Production components, ready on day one. Every one below is live. Start from the library, change anything, or design your own: your model only ever chooses a component and fills in its values. Try them: they’re live. Every component on this page is one of the 50+, recalculating as you use it. 03 · ADAPTIVE THEMING #### Your brand, on every component. Set a project theme in the console, or hand the renderer your app’s own: CSS variables on the web, your ColorScheme in Flutter. Nineteen colour roles, a radius and a font, in light and dark, applied to every component at once. - Set a project theme once in the console - Or inherit the app’s own theme, so a rebrand is one change - Light and dark, following your app Same component, same data. Only the theme changes. 04 · YOUR DATA STAYS YOURS #### Your model, your keys, your users’ data. Val never runs your model. By default, the values your model sends are checked and bound on your own server and streamed to your app through your own response, so tool arguments and your users’ context never reach Val. - Works with OpenAI, Anthropic, the Vercel AI SDK or your own loop - The model never sees markup and can’t inject HTML or script - Server keys stay on your backend; rendering needs no key Your side The model’s values are checked and bound here, then streamed to your app. Val Holds your components and their versions. Never runs your model. No tool arguments, no user context The default mode. A hosted data source is opt-in. 05 · PRODUCTION READY #### Built for apps in people’s hands, not for demos. ##### Every value checked The model can only pick a published component and fill its shape. Anything else is refused, and the model fixes its call. ##### Draft, staging, production Test a change on staging before anyone sees it. Nothing is served until it is published. ##### Rollback and pinning Publish the version that worked, or pin an app to a version through later edits. ##### Version-aware Each app says what it can draw, so an older version never receives a component it can’t. ##### Streams in place Prose arrives a word at a time; each component lands where the model put it. ##### Native on web and mobile React on the web, Flutter on iOS and Android. The console previews with the same renderer. DEVELOPERS #### Four places it plugs in. Your agent stays yours. Add your components as tools, append the guidance, feed the model’s output through, and draw the stream. Or hand it all to your coding agent. ``` import { GenUi } from '@val-genui/server' const genui = new GenUi({ apiKey: process.env.GEN_UI_SECRET_KEY! }) const ui = genui.reply({ client: request.headers.get('gen-ui-client') }) // Your components, beside your own tools const tools = [...myTools, ...(await ui.tools('openai'))] const system = `${mySystem}\n\n${await ui.guidance()}` ui.text(delta) // prose, as it streams if (genui.owns(call.name)) await ui.call(call) // a component, in its place void ui.end() return ui.response() ``` Already use gpt_markdown? Keep it for the prose. Val adds components to the same reply, drawn natively in Flutter on iOS, Android and the web. Let your coding agent do it One prompt for Claude Code, Cursor or Codex sets it up in your app. #### Asked first, answered plainly. The docs start from zero, and the quickstart takes five minutes. **01 We already built our own. Why switch?** An in-house version usually covers the first few components. Val covers the rest: 50+ components, theming, validation of everything the model sends, versions with staging and rollback, and changes that reach installed apps without a release, on web and mobile. Your model and agent loop stay as they are. **02 Can we bring our own components?** Yes. Start from ours, change any of them, or design your own in the console, in an editor or with a coding agent. Each one is validated before it can be saved. **03 What is Val Generative UI, in one sentence?** A service that lets your AI answer with interface instead of paragraphs: your team designs components once, your model picks one and fills in its values, and your app draws it natively. **04 Is it a model? Do I have to switch mine?** No. Val Generative UI never runs your model. Your components are handed to your model as tools, in OpenAI, Anthropic or Vercel AI SDK format, beside the tools you already have. Your agent loop and your keys stay yours. **05 Does the model write the UI?** Never. A person designs each component in a small XML vocabulary (in the console, in an editor, or with a coding agent), and it is validated before it can be saved. The model only chooses which component to show and supplies the values, checked against the shape the component declares. **06 Where does the data come from?** Either from the model, which fills the values in its tool call, or from your own systems: a component can be wired to a data source that the service fetches when it is drawn. **07 What can a component contain?** Layout, text, badges and buttons; inputs and local state; line, area, bar and pie charts; timelines, metric grids and progress; maths and plots. Buttons send named actions to your app, so a component can start a real workflow. **08 Which platforms does it run on?** Web with React (@val-genui/react) and mobile with Flutter (val_genui_flutter). Your backend uses @val-genui/server to stream the answer. The console itself draws through the same React renderer, so what you preview is what ships. **09 Can I change a component without releasing my app?** Yes, for changes the installed SDK can already draw: layout, bindings, actions, theme. Save a draft, test on staging, publish to production, and roll back if you need to. New native capabilities still need an SDK update. **10 Can I try it without an account?** Yes. The useval CLI includes a local preview: create a component, edit the markup and watch it redraw, with no account and no API key. Val Generative UI is currently in early access. #### Stop maintaining it. Start shipping it. Val Generative UI is in early access. Five minutes from the quickstart to your first live component. --- ## Output Rendering URL: https://useval.ai/output-rendering OUTPUT RENDERING · FREE ON PUB.DEV ### Render everything a model writes. Three Flutter renderers for AI output. gpt_markdown draws the reply and uses the other two for its math and code. #### gpt_markdown The whole reply: Markdown, tables, math and code, correct while it streams. #### val_latex LaTeX math in pure Dart. Inline, display, and half-written formulas mid-stream. #### val_highlight Syntax highlighting for 55 languages in pure Dart, with themes and an editor. NEXT · GENERATIVE UI #### Your answers already look right. Now let them do something. --- ## gpt_markdown URL: https://useval.ai/gpt-markdown ### The Flutter renderer for AI output. Markdown, math and code, perfect while the answer streams. Used by Buzz by Block · 209K downloads a month · 160/160 pub points WHY GPT_MARKDOWN #### The renderer Flutter AI apps ship with. Fast, hard to break, yours to style. FAST faster updates while streaming a 12 KB reply, compared with 1.2.1 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 - 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. #### 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. 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. 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. #### Render it today. Make it interactive next. gpt_markdown is free and stays free. Generative UI is in early access. --- ## Live Scenes URL: https://useval.ai/live-scenes LIVE SCENES · PRIVATE BETA ### The answer, as a live scene Your agent's answer becomes a narrated scene your users can explore, change and act on, inside your product. #### Agents already know the answer. Val gives them a way to show it, narrate it and let people steer it. - How it flows - Narration - Two-way control STREAMS AS IT PLANS agent → tool call plan → scene graph scene → your app → tool_call explain_concept plan 4 steps scene lattice · 32 nodes BUILT FOR AGENTS #### Agent and user share one scene. Either one can move it. Both see why. YOUR PRODUCT #### Drop it into your product. Your theme, your data rules, a few lines of code. The scene takes your product’s colors, type and corner radius. Switch it while it runs. - Midnight Dark dashboard - Daylight Light admin app - Your brand Sample: a health app WHAT COMES NEXT #### Start where you are. Render text free today, add the interface, then the live scene. Each layer builds on the one below. 1. · FREE Output Rendering Markdown, math and code that render while the answer streams. Start free → 2. · EARLY ACCESS Generative UI Your team designs the components. The model fills them in. Your app draws them. Request early access → How it works 3. · PRIVATE BETA THIS PAGE Live Scenes The answer as a narrated scene that people can steer and act on. Request access → #### Show the answer, don't just say it. Live Scenes is in private beta. Tell us what you're building. --- ## Pricing URL: https://useval.ai/pricing PRICING ### Start free. Pay as you grow. The open-source base is free. Val is priced per minute generated, with volume pricing as you grow. OPEN SOURCE #### Free open source, on pub.dev For any Flutter app that shows AI answers. Includes - Markdown, math and code rendering - Fast while the answer streams - gpt_markdown, val_latex and val_highlight - No access needed VAL #### Usage-based per minute generated For product teams shipping Val in an AI product. Everything in Free, plus - Generative UI - Live Scenes (private beta) - Val SDK + API access - Visual generation + narration - Playback + interaction included - Volume pricing as you grow ENTERPRISE #### Custom volume commitments For larger volumes and private deployments. Everything in Usage-based, plus - Custom usage commitments - Higher concurrency - Privacy + deployment controls - SLAs + private deployment options Every plan includes the open-source base. #### How usage works. Four things to know. ##### Free open-source base gpt_markdown, val_latex and val_highlight are free on pub.dev. No access needed. ##### Pay per minute Val is usage-based: you pay for the minutes of visuals it generates. ##### Playback included Replaying a scene and interacting with it are included in the price. ##### Volume pricing Your rate improves as usage grows. Enterprise adds commitments and SLAs. #### Compare plans. Each one includes the one before it. | | Free | Usage-based | Enterprise | | --- | --- | --- | --- | | OUTPUT RENDERING | | | | | Markdown, math and code rendering | | | | | gpt_markdown, val_latex, val_highlight | | | | | Open source (BSD-3-Clause) | | | | | VAL | | | | | Generative UI | | Early access | | | Live Scenes | | Private beta | | | Val SDK + API access | | | | | Visual generation + narration | | | | | Playback + interaction | | Included | Included | | Volume pricing | | | | | ENTERPRISE | | | | | Custom usage commitments | | | | | Higher concurrency | | | | | Privacy + deployment controls | | | | | SLAs + private deployment options | | | | #### Questions about pricing **01 Can I start without access?** Yes. The Output Rendering packages are free and open source on pub.dev. Install gpt_markdown today; your app keeps it when you add Val. **02 How is Val priced?** Per minute generated, with volume pricing as usage grows. Playback and interaction are included. **03 How do I get Generative UI or Live Scenes?** Generative UI is in early access and Live Scenes is in private beta. Request access and tell us what you're building. **04 When do I need Enterprise?** For larger volumes, higher concurrency, custom commitments, SLAs, and privacy and deployment controls. Talk to an engineer and we’ll shape it around your volume. #### Start with text, grow into scenes. Install the open-source base today, or tell us what you're building. --- ## val_latex URL: https://useval.ai/open-source/val-latex ### LaTeX math, in pure Dart. A TeX engine that lays formulas out by TeX's rules, and Flutter widgets that draw them — one formula, math inside a sentence, or an AI reply while it is still streaming in. - **VAL_LATEX_FLUTTER · 30 DAYS**: 60.2K - **VAL_LATEX · 30 DAYS**: 61.1K - **COMMANDS IT KNOWS**: 4,429 - **ENVIRONMENTS**: 88 From pub.dev, 2026-11-13. Downloads count installs, not people. Commands and environments are counted from the engine's own catalog. #### Formulas grow as the reply arrives. MathText renders an AI reply while it streams in. Nothing half-typed ever flashes on screen. - A formula that is still open renders as far as it has come. - A dangling $, $$ or \[ is held back; $5 stays a price. - One widget for the whole reply: text and math together. #### Long formulas fit any screen. A display formula too long for the screen breaks into lines at relations and operators, aligned under the first =. Drag the width and watch it re-flow. - No settings: Math.tex wraps on its own. - What cannot break scrolls, shrinks or clips: your choice. #### It reads math aloud. The engine turns any formula into words for screen readers, voice assistants and text-to-speech, at three levels of detail. Pick a formula, change the detail, and listen. > “x equals the fraction with numerator minus b plus or minus the square root of b squared minus 4 a c end root and denominator 2 a end fraction” toSpeech(parseLatex(tex), verbosity: SpeechVerbosity.normal), run on this formula when the page was built. The voice is your browser's. #### Real TeX, not a subset. 4,429 commands and 88 environments: amsmath, chemistry, physics, diagrams, arrays and more. Pick one to see the Flutter code and what it draws. ``` import 'package:flutter/widgets.dart'; import 'package:val_latex_flutter/val_latex_flutter.dart'; /// An inline formula, then the same kind of formula in display style: /// centred, with large operators and an equation number at the margin. Widget example() => const Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Math.tex(r'x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}'), SizedBox(height: 12), Math.tex( r'\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6} \tag{1}', displayMode: true, ), ], ); ``` Each render is made from the code beside it, at 18 px. #### Flutter widgets, and the Dart engine under them. The widgets: Math.tex for a formula, MathText for math inside text and streaming replies, with selection, taps and screen readers. The engine: parse, lay out, find formulas in text, speak them, normalise them. On the Dart VM, on servers and compiled to JavaScript. A Flutter app adds val_latex_flutter only; it includes the engine. ``` import 'package:val_latex/val_latex.dart'; final result = parseLatex(r'\frac{a+1}{b}'); toSpeech(result); // the fraction with numerator a plus 1 and denominator b end fraction toLatex(parseLatex('α ≤ x²'), ascii: true); // \alpha\le x^{2} ``` WHAT COMES NEXT #### Text is the first step. Ask below: the same answer becomes an interface, then a live scene. 1. · FREE THIS PAGE Output Rendering Markdown, math and code that render while the answer streams. See gpt_markdown → 2. · EARLY ACCESS NEXT STEP Generative UI Your team designs the components. The model fills them in. Your app draws them. Request early access → How it works 3. · PRIVATE BETA Live Scenes The answer as a narrated scene that people can steer and act on. Request access → How it works #### Asked first. The short version for teams choosing a math renderer. **01 Is it free?** Yes. val_latex and val_latex_flutter are open source under the BSD-3-Clause license, on pub.dev. **02 Does it need a WebView or JavaScript?** No. The engine is pure Dart and the widgets draw glyphs from the font's outlines through Flutter — no WebView, no JavaScript, no platform code. **03 What doesn't it do yet?** The docs keep an honest list: where it differs from KaTeX, and its current limitations. #### Typeset it properly. Start with one widget; the docs cover the widgets, their options and the full API. --- ## val_highlight URL: https://useval.ai/open-source/val-highlight ### Code that reads, in pure Dart. A syntax highlighter for 55 languages that runs anywhere Dart does — and Flutter widgets to show code, and to edit it, with the colours following every keystroke. - **VAL_HIGHLIGHT_FLUTTER · 30 DAYS**: 60.8K - **VAL_HIGHLIGHT · 30 DAYS**: 59.5K - **LANGUAGES**: 55 - **BUILT-IN THEMES**: 8 From pub.dev, 2026-11-13. Downloads count installs, not people. Languages and themes are counted from the engine's own registry. #### Colours that keep up with typing. CodeField is a real Flutter text field that re-highlights on every keystroke. After an edit, only the lines it can affect are scanned again. - Line numbers, the current line and the matching bracket. - Or colour any TextField: a search box, a query input. #### 8 themes. Or your VS Code theme. Light, dark and high-contrast themes are built in, and a VS Code colour theme file reads in as one. - One CodeTheme sets them app-wide. - Or build your own from scopes. #### 55 languages, one import each. Each language is its own import, so an app ships only the grammars it needs. Hover one to see the names and file extensions it answers to. - bash - batch - c - clojure - cmake - cpp - csharp - css - dart - diff - dockerfile - elixir - erlang - fsharp - go - graphql - groovy - haskell - hcl - html - ini - java - javascript - json - jsx - julia - kotlin - latex - less - lua - makefile - markdown - nasm - nginx - objectivec - ocaml - perl - php - powershell - protobuf - python - r - ruby - rust - scala - scss - solidity - sql - swift - toml - tsx - typescript - xml - yaml - zig #### Show it, edit it, make it yours. CodeView to show code, CodeField to edit it, a controller for any TextField, and spans for your own widgets. Pick one to see the code and what it draws. ``` import 'package:material_ui/material_ui.dart'; import 'package:val_highlight/languages/kotlin.dart'; import 'package:val_highlight_flutter/val_highlight_flutter.dart'; /// Lines 12 to 19 of a longer file. const excerpt = ''' fun total(items: List): Double { var sum = 0.0 for (item in items) { sum += item.price * item.quantity } // Prices include tax. return sum }'''; class Excerpt extends StatelessWidget { const Excerpt({super.key}); @override Widget build(BuildContext context) { return const CodeView( excerpt, language: kotlinLanguage, lineNumbers: true, firstLineNumber: 12, highlightedLines: {14, 15, 16}, ); } } ``` Each render is made from the code beside it. #### Flutter widgets, and the Dart engine under them. The widgets: CodeView to show code, CodeField to edit it, a controller for any TextField, and spans for your own widgets. The engine: languages, themes, incremental updates, detection and highlighted HTML. On servers, in tools and compiled to JavaScript. A Flutter app adds both: the widgets, and the languages and themes, which are imported from val_highlight. ``` import 'package:val_highlight/val_highlight.dart'; import 'package:val_highlight/languages/dart.dart'; final html = const Highlighter().toHtml( 'final n = 42; // answer', language: dartLanguage, renderer: const HtmlRenderer(wrap: true), ); ``` ```
final n = 42; // answer
``` The output above was produced by running this code when the page was built. WHAT COMES NEXT #### Text is the first step. Ask below: the same answer becomes an interface, then a live scene. 1. · FREE THIS PAGE Output Rendering Markdown, math and code that render while the answer streams. See gpt_markdown → 2. · EARLY ACCESS NEXT STEP Generative UI Your team designs the components. The model fills them in. Your app draws them. Request early access → How it works 3. · PRIVATE BETA Live Scenes The answer as a narrated scene that people can steer and act on. Request access → How it works #### Asked first. The short version for teams choosing a highlighter. **01 Is it free?** Yes. val_highlight and val_highlight_flutter are open source under the BSD-3-Clause license, on pub.dev and GitHub. **02 Does it need native code or a WebView?** No. The engine is pure Dart — its tests run on the Dart VM and compiled to JavaScript — and the widgets are plain Flutter text. **03 My language isn't listed. Can I add it?** Yes — you can change a built-in language or write a grammar of your own from rules; the docs walk through both. #### Make code readable. Start with one widget; the docs cover the widgets, the themes and the full API. --- ## Use cases URL: https://useval.ai/use-cases ### Where text falls short. Pick one to watch its text answer become the scene Val returns. #### Not on the list? Tell us what your users ask. We'll talk through what Val would return. --- ## Use case: AI-native applications URL: https://useval.ai/use-cases/apps ### Replies people can touch. When your assistant needs more than text, Val returns something people can use. GENERATIVE UI · LIVE #### Answers that end in an action. Not a link to another screen. Try them, they’re live. Two of 50+ components, in your theme, on web and mobile. See Generative UI WHAT CHANGES #### Today, and with Val. Same question, same model. The answer is a paragraph. People read it and leave. The answer is a surface they can tap, change and act on. Every new interactive answer is a sprint and an app release. Your AI picks from 50+ components. New ones reach installed apps without a release. Interactive replies look different on every platform. One component, native in Flutter and React, in your theme. FOR FLUTTER TEAMS #### In your app this week. No app release. 1. Connect your agent Add Val’s components to the tools your model already calls. Your model, keys and history stay with you. 2. Draw the reply One widget renders each answer natively in Flutter, in your theme, while it streams. 3. Change it any time Edit or add components in the console. Installed apps use them on the next answer. ``` import 'package:val_genui_flutter/val_genui_flutter.dart'; final response = await client.send( http.Request('POST', Uri.parse('$backend/chat')) ..headers.addAll(genUiHeaders()) ..body = question, ); GenUiReplyView( events: readEvents(response.stream), onAction: (action) => send(actionMessage(action)), ) ``` Buzz by Block ships our renderer, gpt_markdown 209K gpt_markdown downloads a month 500K+ installs of Plusfinity, our own app built on Val #### Let replies do more than talk. A 20-minute call to see this running on your own use case. --- ## Use case: Planning and forecasting URL: https://useval.ai/use-cases/notebook ### Forecasts you can test. Ask what if churn falls. Val returns the model, with churn on a slider. The text answer, then what Val returns. Drag the slider to compare. GENERATIVE UI · LIVE #### Every assumption, adjustable. Every number, live. Try them, they’re live. Two of 50+ components, in your theme, on web and mobile. See Generative UI WHAT CHANGES #### Today, and with Val. Same question, same model. The forecast is a table pasted into chat. It's a model, with the assumptions on sliders. Every “what if” is another prompt and another wait. People drag the input and the numbers update at once, with no model call. Decisions leave the chat as screenshots. Approve or share straight from the answer, with the values attached. FOR FLUTTER TEAMS #### In your app this week. No app release. 1. Connect your agent Add Val’s components to the tools your model already calls. Your model, keys and history stay with you. 2. Draw the reply One widget renders each answer natively in Flutter, in your theme, while it streams. 3. Change it any time Edit or add components in the console. Installed apps use them on the next answer. ``` import 'package:val_genui_flutter/val_genui_flutter.dart'; final response = await client.send( http.Request('POST', Uri.parse('$backend/chat')) ..headers.addAll(genUiHeaders()) ..body = question, ); GenUiReplyView( events: readEvents(response.stream), onAction: (action) => send(actionMessage(action)), ) ``` Buzz by Block ships our renderer, gpt_markdown 209K gpt_markdown downloads a month 500K+ installs of Plusfinity, our own app built on Val #### Put the forecast in their hands. A 20-minute call to see this running on your own use case. --- ## Use case: Support and onboarding URL: https://useval.ai/use-cases/onboarding ### Walkthroughs, not doc links. A user asks how. Val drops a live walkthrough into the screen they're on. GENERATIVE UI · LIVE #### Resolve it in the reply. No ticket, no hand-off. Try them, they’re live. Two of 50+ components, in your theme, on web and mobile. See Generative UI WHAT CHANGES #### Today, and with Val. Same question, same model. A user asks how and gets a link to the docs. They get the steps, live, on the screen they're on. Agents paste the same instructions all day. The assistant hands over the fix, a refund or a plan change, ready to approve. The help drifts from the product with every release. Change the walkthrough in the console. Installed apps get it the same day. FOR FLUTTER TEAMS #### In your app this week. No app release. 1. Connect your agent Add Val’s components to the tools your model already calls. Your model, keys and history stay with you. 2. Draw the reply One widget renders each answer natively in Flutter, in your theme, while it streams. 3. Change it any time Edit or add components in the console. Installed apps use them on the next answer. ``` import 'package:val_genui_flutter/val_genui_flutter.dart'; final response = await client.send( http.Request('POST', Uri.parse('$backend/chat')) ..headers.addAll(genUiHeaders()) ..body = question, ); GenUiReplyView( events: readEvents(response.stream), onAction: (action) => send(actionMessage(action)), ) ``` Buzz by Block ships our renderer, gpt_markdown 209K gpt_markdown downloads a month 500K+ installs of Plusfinity, our own app built on Val #### Show the steps, live. A 20-minute call to see this running on your own use case. --- ## Use case: Engineering and operations URL: https://useval.ai/use-cases/platforms ### Approve the fix, not the essay. When the agent finishes, your team sees where it broke and what to approve. GENERATIVE UI · LIVE #### From finding to approval. In one answer. Try them, they’re live. Two of 50+ components, in your theme, on web and mobile. See Generative UI WHAT CHANGES #### Today, and with Val. Same question, same model. The agent finishes and posts a long write-up. Your team sees the path that broke and the fix to approve. Checking the agent's work means rereading its logs. Replay how it got there, one step at a time. Approvals happen in another tool. Approve in the answer. Your app gets the decision as a payload. FOR FLUTTER TEAMS #### In your app this week. No app release. 1. Connect your agent Add Val’s components to the tools your model already calls. Your model, keys and history stay with you. 2. Draw the reply One widget renders each answer natively in Flutter, in your theme, while it streams. 3. Change it any time Edit or add components in the console. Installed apps use them on the next answer. ``` import 'package:val_genui_flutter/val_genui_flutter.dart'; final response = await client.send( http.Request('POST', Uri.parse('$backend/chat')) ..headers.addAll(genUiHeaders()) ..body = question, ); GenUiReplyView( events: readEvents(response.stream), onAction: (action) => send(actionMessage(action)), ) ``` Buzz by Block ships our renderer, gpt_markdown 209K gpt_markdown downloads a month 500K+ installs of Plusfinity, our own app built on Val #### Ship the fix, not the report. A 20-minute call to see this running on your own use case. --- ## Use case: Learning and training URL: https://useval.ai/use-cases/tutoring ### Lessons built for the question. The tutor names a concept. The student gets a live lesson to try. GENERATIVE UI · LIVE #### Practice, not paragraphs. Checked as they go. Try them, they’re live. Two of 50+ components, in your theme, on web and mobile. See Generative UI WHAT CHANGES #### Today, and with Val. Same question, same model. The tutor explains with a wall of text. The student gets a live lesson to try. Checking understanding is another chat turn. A quick check inside the answer, with the math typeset. Every new subject needs new screens. Your AI builds the lesson from the question. No release. FOR FLUTTER TEAMS #### In your app this week. No app release. 1. Connect your agent Add Val’s components to the tools your model already calls. Your model, keys and history stay with you. 2. Draw the reply One widget renders each answer natively in Flutter, in your theme, while it streams. 3. Change it any time Edit or add components in the console. Installed apps use them on the next answer. ``` import 'package:val_genui_flutter/val_genui_flutter.dart'; final response = await client.send( http.Request('POST', Uri.parse('$backend/chat')) ..headers.addAll(genUiHeaders()) ..body = question, ); GenUiReplyView( events: readEvents(response.stream), onAction: (action) => send(actionMessage(action)), ) ``` Buzz by Block ships our renderer, gpt_markdown 209K gpt_markdown downloads a month 500K+ installs of Plusfinity, our own app built on Val #### Teach with scenes, not walls. A 20-minute call to see this running on your own use case. --- ## Use case: Research and technical explanation URL: https://useval.ai/use-cases/smartboard ### Complex systems, easy to follow. Ask how something works. Val builds the system on screen, one part at a time. GENERATIVE UI · LIVE #### Results people can explore. Not just read. Try them, they’re live. Two of 50+ components, in your theme, on web and mobile. See Generative UI WHAT CHANGES #### Today, and with Val. Same question, same model. A dense result becomes a dense paragraph. The system is built on screen, one part at a time. Diagrams are static images someone made by hand. Live plots and diagrams that respond as people explore. The explanation and the picture live apart. Val narrates each step while it draws. FOR FLUTTER TEAMS #### In your app this week. No app release. 1. Connect your agent Add Val’s components to the tools your model already calls. Your model, keys and history stay with you. 2. Draw the reply One widget renders each answer natively in Flutter, in your theme, while it streams. 3. Change it any time Edit or add components in the console. Installed apps use them on the next answer. ``` import 'package:val_genui_flutter/val_genui_flutter.dart'; final response = await client.send( http.Request('POST', Uri.parse('$backend/chat')) ..headers.addAll(genUiHeaders()) ..body = question, ); GenUiReplyView( events: readEvents(response.stream), onAction: (action) => send(actionMessage(action)), ) ``` Buzz by Block ships our renderer, gpt_markdown 209K gpt_markdown downloads a month 500K+ installs of Plusfinity, our own app built on Val #### Let the class watch it work. A 20-minute call to see this running on your own use case. --- ## About URL: https://useval.ai/about ABOUT VAL ### We build the visual layer for AI agents. Your agent's answers become interfaces people can use, inside your product. Some answers are better seen. - **COMPANY**: Plusfinity AI, Inc. - **BASED IN**: New York, NY - **CONTACT**: info@useval.ai - **GPT_MARKDOWN DOWNLOADS / 30 DAYS**: 209K - **GPT_MARKDOWN PUB POINTS**: 160/160 - **PLUSFINITY INSTALLS**: 500K+ - **AI QUESTIONS ANSWERED IN PLUSFINITY**: 20M+ From pub.dev, live. Downloads count installs, not people. Installs and questions are Plusfinity's own numbers, not Val usage. #### We built it for ourselves first. 1. An AI app that teaches. We build Plusfinity, an AI learning app: 500K+ installs and 20M+ questions answered. Every Val layer runs there first. 2. The renderer it needed. Its answers had to render properly in Flutter, while they stream. So we built gpt_markdown and gave it away. Buzz by Block uses it. 3. The rest, for every team. Text is the first step. Val turns answers into interfaces (early access) and live scenes (private beta), inside your product. #### Four rules we build by. - **Some answers are better seen.**: A chart beats a paragraph about a chart. When an answer has a shape, show the shape. - **Your model, your data.**: Val never runs your model. Your model, your keys and your users' history stay with you. - **We use it before you do.**: Every layer ships in Plusfinity first, with real users, before it reaches yours. - **Open at the base.**: The renderers are free and open source under BSD-3. Rendering AI output well shouldn't cost anything. #### The people behind Val. - Mohammad Asfour Co-founded Plusfinity (500K+ installs). Cornell Tech, NYU. FOUNDER & CEO - Laith Siam Co-founder & CTO of Plusfinity. Before that, R&D engineer at Freightos. FOUNDING CTO - Samin Yeasar Sohag Two years building Plusfinity's app. Flutter, Dart and Rust. R&D ENGINEER #### Google for Startups Accelerator. Val is in the Google for Startups Accelerator: MENAT 2026 cohort, for AI-first startups across the Middle East, North Africa and Türkiye. #### Ask the people building Val. --- ## Enterprise URL: https://useval.ai/enterprise ### Larger volumes. Private deployments. Pricing is custom, shaped around your volume and how you deploy. #### What Enterprise includes 1. Custom usage commitments 2. Higher concurrency 3. Privacy and deployment controls 4. SLAs and private deployment options Val is priced per minute generated. Val is in private beta. We cover data handling on a call. #### Every deployment starts with a call. --- ## Security URL: https://useval.ai/security ### What runs where. Val Generative UI never runs your model; your model, keys and history stay with you. #### How to check each claim ##### VAL GENERATIVE UI - Your model never writes interface code. It picks a component your team designed and fills in its values. Read the docs - Components are checked before they're published. ##### VAL - Val is in private beta. We cover data handling on a call. ##### OUTPUT RENDERING - Open source under the BSD-3-Clause license. The source ships with every package. GitHub (opens in a new tab) - Every package is published on pub.dev by the verified publisher useval.io. View on pub.dev (opens in a new tab) - It runs inside your app. val_latex and val_highlight are pure Dart and draw with Flutter, with no WebView and no platform code. Output Rendering #### Report a security issue info@useval.ai #### Need a private deployment? Enterprise plans can include private deployment options. --- ## Plusfinity URL: https://useval.ai/plusfinity ### Built on Val: Plusfinity. Plusfinity, our own AI learning app, is where every Val layer is integrated and tested first. #### PLUSFINITY'S OWN NUMBERS The app's history, not Val usage. - **lifetime installs**: 500K+ - **AI questions answered**: 20M+ #### Every Val layer, tested here first. - Live Scenes Narrated, interactive scenes from your agent's output. PRIVATE BETA - Generative UI Components your team designs, filled in by the model. EARLY ACCESS - Output Rendering Markdown, math and code that render fast while AI streams. OPEN SOURCE #### The same layers, in your product. Val is in private beta for product and engineering teams. --- ## Blog: AI answers shouldn’t outgrow their interface URL: https://useval.ai/blog/ai-answers-interface RELEASE · OCTOBER 21, 2026 · 8 MIN READ ### AI answers shouldn’t outgrow their interface Introducing gpt_markdown 1.4.0: faster streaming, richer rendering, and more room for what comes next. Mohammad Asfour Founder & CEO An AI answer is not delivered like a finished document. It grows in public: a sentence becomes a list, the list adds a table, and the answer ends with code or an equation. Each new chunk can extend, or reinterpret, what came before. The interface has to keep up while all of this is still being written. At Val, we’re building the live visual layer for AI agents. That starts with making the output people already use feel fast, readable, and native to their product. gpt_markdown 1.4.0 is our biggest release yet. Our open-source Flutter renderer now has a new parsing pipeline, lazy rendering for long documents, streaming animations, and built-in syntax highlighting. In our benchmarks, parsing is 3–9× faster than the legacy parser. At 12 KB, each streaming update is 31× faster with GptMarkdown and 74× faster with the new SliverGptMarkdown than in 1.2.1. The point isn’t just a faster parser. It’s an interface that keeps up as an answer grows. #### See it first #### Part 1: Speed that lasts beyond the first sentence ##### A new parser. A faster frame. The new single-pass parser replaces the legacy regex engine as the default. In equivalent source-to-span workloads, it measured 3–9× faster. Parsing is only part of the work. Flutter also builds, lays out, and paints the result. Whole-frame benchmarks measured 1.4–2× faster rendering than 1.2.1 across the tested document shapes. ##### Streaming that keeps up Rendering a finished answer once is one problem. Updating it on every incoming chunk is another. If each update repeats work across everything already received, longer answers become progressively more expensive to display. The new pipeline caches settled segments and updates the changing tail. In our measured workloads, per-chunk cost stayed broadly stable as replies grew, instead of increasing with the accumulated answer. | REPLY LENGTH | GPTMARKDOWN VS 1.2.1 | SLIVERGPTMARKDOWN VS 1.2.1 | | --- | --- | --- | | 2 KB | 3.8× faster | 7.6× faster | | 6 KB | 16× faster | 23× faster | | 12 KB | 31× faster | 74× faster | These ratios use the more conservative of two runs. The small 2 KB workload was close to the measurement floor; the 12 KB improvement reproduced closely. #### Part 2: Long answers, one screen at a time Stable streaming solves repeated work. Long answers introduce a second problem: most of the response is off screen. Thirty screens of content. One screen of attention. The renderer shouldn’t need to build all thirty at once. SliverGptMarkdown creates spans and widgets only for document segments requested by the viewport, including its cache extent: ``` CustomScrollView( slivers: [ SliverGptMarkdown(longAnswer), ], ) ``` The source is segmented up front; rendering is lazy. In the longest cold-mount workload tested, the sliver was 6.4× faster than the regular widget. Which one should you use? Keep GptMarkdown for chat messages, cards, and short content. Use SliverGptMarkdown for long responses or documents in a scrollable viewport. The regular widget is cheaper for short content and supports character reveal. The sliver displays source updates immediately, and selection covers mounted content. A single large table or code block remains one segment. It is not virtualized internally. #### Part 3: Built for AI chat Performance keeps an answer moving. Presentation determines whether it feels native to the product around it. ``` GptMarkdown( reply, isStreaming: generating, animation: GptMarkdownAnimation.fade, blockAnimation: GptMarkdownBlockAnimation.fadeIn, ) ``` Choose typewriter, fade, blur, or wave reveals for text. Give tables, code blocks, and images their own block entrances. Timing and curves are configurable, and animations respect reduced-motion settings. The renderer also handles the details that make AI output usable: - Rich content together: Markdown, LaTeX, tables, lists, images, and citations. - Code ready to read: syntax highlighting for nearly 200 languages, language labels, and accessible copy controls. - Links that behave like text: natural wrapping, baseline alignment, and selection, plus automatic linking of bare URLs. - Accessibility throughout: text scaling, bidirectional layouts, and a coherent streaming semantics node instead of repeated announcements from individual blocks. #### How it compares Most Flutter Markdown renderers were designed for completed documents. gpt_markdown 1.4.0 is designed for AI output while it is still arriving. That distinction changes both the feature set and the performance curve. | CAPABILITY | GPT_MARKDOWN | FLUTTER_MARKDOWN_PLUS | MARKDOWN_WIDGET | | --- | --- | --- | --- | | Incremental streaming | Built in | No | No | | Per-chunk cost as replies grow | Approximately flat | Grows with the document | Grows with the document | | Lazy block rendering | Real sliver, built on demand | Parses the complete document | Parses the complete document | | Character and block animations | Built in | No | No | | Inline and block LaTeX | Built in | No | No | | Highlighted code with label and copy control | Built in | Custom implementation | Highlighting only | This is why a comparison based only on one finished paragraph misses the most important workload. Even so, the architectural difference is visible in finished-message cold mounts, using the same documents and harness: | CONTENT | VS FLUTTER_MARKDOWN_PLUS | VS MARKDOWN_WIDGET | | --- | --- | --- | | Links | 4.5× faster | 7.2× faster | | Bullet lists | 3.1× faster | 4.7× faster | | Plain prose | 2.4× faster | 2.8× faster | Streaming is where the difference becomes most visible. At an 18 KB reply, SliverGptMarkdown processed the next chunk in 1.0 ms, compared with 80.2 ms for flutter_markdown_plus and 93.0 ms for markdown_widget, about 80× and 93× faster in that workload. gpt_markdown is not faster at every isolated construct. Code blocks and some table workloads cost more because the default renderer does more, including syntax highlighting, content-aware sizing, a language label, and an accessible copy control. The full benchmark report documents the methodology, raw results, package versions, and every measured tradeoff. For AI interfaces, this is the larger shift in 1.4.0: performance no longer has to deteriorate as the answer becomes more useful. #### Part 4: Customize anything Performance makes a renderer viable. Control makes it part of your product. There are three levels of customization, and most integrations won’t need all three. ##### Level 1: Style sheets Change colors, typography, spacing, and component styles without rebuilding the components. Set defaults app-wide and override individual properties where needed. ##### Level 2: Builders Bring your own code panel, image viewer, or table. Span-based builders let you customize links, citations, and inline code while keeping them part of the text flow. ##### Level 3: Invent your own syntax Render @mentions, #channels, emoji shortcodes, or ticket references with inline patterns. Register custom blocks for callouts, product cards, or charts. Use directives for payloads the Markdown parser should leave untouched. Your application supplies those components and their behavior. The renderer gives them a place alongside the answer, without a fork. See the customization documentation for implementation examples. #### Part 5: Get it. Keep your integration. For a new Flutter AI interface, getting started is one dependency and one widget: ``` dependencies: gpt_markdown: ^1.4.0 ``` ``` import 'package:gpt_markdown/gpt_markdown.dart'; GptMarkdown(markdownText) ``` The widget follows your Flutter theme. Start there, then customize what your product needs. No APIs have been removed. The legacy parser remains supported, with removal planned for 2.0.0. Passing components or inlineComponents, even an empty list, still selects that legacy path. Migrate those extensions to use the new pipeline. Links and block elements have a different rendering structure, so existing widget tests may need adjustments. The migration guide covers those changes and the replacement APIs. Get the package · Try the playground · Read the docs If your product already renders AI output in Flutter, try one of your real responses in the playground. Then use the migration guide to move without giving up the integration you already built. #### Beyond the text box gpt_markdown makes today’s AI output fast, readable, and native to the product around it. Val takes that direction further: toward AI output people can inspect, interact with, and steer, not just read. gpt_markdown is our open-source rendering foundation. Fast streaming and room for custom UI are essential to that future. Version 1.4.0 puts those capabilities in developers’ hands today. Building an AI product that needs richer output than a text box? Request early access to Val. GPT_MARKDOWN - Release notes - gpt_markdown - Playground - pub.dev - GitHub #### Try it in your app. Paste the prompt into your coding agent. It installs gpt_markdown and wires it into your chat screen. --- ## Guides URL: https://useval.ai/guides ### Guides Short, honest answers to what Flutter teams building with AI ask most. #### OUTPUT RENDERING - The best Flutter renderer for AI chat output Which Flutter package should render LLM replies? A comparison of gpt_markdown, flutter_markdown_plus and markdown_widget on streaming speed, LaTeX, code and edge cases, with published benchmarks. - How to render streaming LLM output in Flutter Render a ChatGPT, Claude or Gemini reply in Flutter while it streams: Markdown, LaTeX, tables and code, without jank. Step by step with gpt_markdown. - flutter_markdown is discontinued: what to use instead flutter_markdown is discontinued on pub.dev. Choose between flutter_markdown_plus and gpt_markdown, and migrate in minutes, with a side-by-side API map. - How to render LaTeX math in Flutter Render LaTeX formulas in Flutter with a pure-Dart TeX engine: one formula, math inside text, or a streaming AI reply. val_latex, and migrating from flutter_math_fork. #### GENERATIVE UI - Generative UI for Flutter: the options How to let your AI answer with real Flutter widgets: build it in-house, use the A2UI protocol (a2ui_flutter), or use Val Generative UI. What each costs to run, compared honestly. - Generate Generative UI components for Flutter with your coding agent Let Claude Code, Cursor or Codex create, check and preview Generative UI components for your Flutter app, then publish them without an app release. --- ## Guide: The best Flutter renderer for AI chat output URL: https://useval.ai/guides/best-flutter-renderer-for-ai-output ### The best Flutter renderer for AI chat output Updated 2026-11-17 THE SHORT ANSWER For AI chat in Flutter, use gpt_markdown. It is built for model output: it streams without re-rendering the whole reply, renders Markdown, LaTeX math, tables and highlighted code in one widget, and handles half-written syntax mid-stream. In the published benchmarks a 12 KB streaming update is 31× faster than gpt_markdown 1.2.1 (74× with SliverGptMarkdown), and its cost stays flat as the reply grows while general-purpose renderers slow down. #### Quick answer - Rendering LLM or agent replies (chat, copilots, tutors, assistants): gpt_markdown. - Static Markdown documents (READMEs, help pages) with no math or streaming: flutter_markdown_plus is a fine choice. - A table of contents or document navigation: markdown_widget has a built-in TOC. - Interactive answers (forms, simulators, approvals) beside the text: Val Generative UI, which uses gpt_markdown for the prose. #### What AI output needs that documents don't A model's reply arrives a few tokens at a time, is often long, mixes Markdown with LaTeX and code, and is sometimes malformed. A renderer for AI output has to stay fast while the text grows, draw unfinished syntax sensibly (half a table, an unclosed code fence, a formula cut in two), and render math and code without extra packages. #### Comparison | | gpt_markdown | flutter_markdown_plus | markdown_widget | | --- | --- | --- | --- | | Built for streaming LLM replies | Yes: only the live tail is rebuilt | No: re-renders the document | No: re-renders the document | | Streaming a 12 KB reply (per update) | 3.4 ms (1.3 ms with the sliver) | 49.3 ms | 57.0 ms | | LaTeX math | Built in (val_latex, pure Dart) | Via extensions | Via extensions | | Syntax-highlighted code | Built in (val_highlight, 55 languages) | Via a builder | Built in | | Half-written syntax mid-stream | Handled | Not a design goal | Not a design goal | | Lazy layout for very long replies | SliverGptMarkdown | No | No | | Custom widgets inside the text | Inline components and directives | Builders | Builders | | Status | Active, 160/160 pub points | Active (community fork of flutter_markdown) | Active | Streaming times are raw elapsed times from gpt_markdown's published benchmark (Flutter, same machine, same session). On finished messages gpt_markdown is faster for links, lists, prose and headings, and slower for code blocks and small tables. The full methodology and caveats are in the benchmark report. #### Get started ``` flutter pub add gpt_markdown ``` ``` import 'package:gpt_markdown/gpt_markdown.dart'; GptMarkdown( reply, // the text so far animation: GptMarkdownAnimation.fade, isStreaming: stillGenerating, ) ``` For replies that run to many screens, put `SliverGptMarkdown(reply)` in a `CustomScrollView` so only what is on screen is laid out. #### Who uses it gpt_markdown is used by Buzz by Block and downloaded about 190K times a month on pub.dev. It is maintained by Val (useval.ai) as the free rendering layer of its platform. #### Frequently asked - **What is the best Flutter package to render ChatGPT, Claude or Gemini responses?**: gpt_markdown. It renders Markdown, LaTeX math, tables and syntax-highlighted code from any LLM in one widget, and stays fast while the reply streams. - **Does gpt_markdown support streaming?**: Yes. Pass the text so far and isStreaming: true; it keeps settled blocks and rebuilds only the live tail, with optional reveal animations. - **Does it render LaTeX math?**: Yes, inline and display math, using val_latex, a pure-Dart TeX engine. No WebView. - **Is gpt_markdown free?**: Yes. It is open source (BSD-3-Clause) on pub.dev. --- ## Guide: How to render streaming LLM output in Flutter URL: https://useval.ai/guides/render-streaming-llm-output-flutter ### How to render streaming LLM output in Flutter Updated 2026-11-17 THE SHORT ANSWER Accumulate the streamed text and pass it to GptMarkdown with isStreaming: true. gpt_markdown rebuilds only the part of the reply that is still changing, draws unfinished Markdown sensibly, and renders math and code in the same widget. For very long replies, use SliverGptMarkdown. #### 1. Install ``` flutter pub add gpt_markdown ``` #### 2. Render the reply as it grows Keep the text received so far in state and rebuild on each chunk. gpt_markdown does the rest: settled blocks are reused, so each update costs about the same whether the reply is 2 KB or 18 KB. ``` String reply = ''; bool generating = true; await for (final chunk in model.stream(prompt)) { setState(() => reply += chunk); } setState(() => generating = false); // In build(): GptMarkdown( reply, animation: GptMarkdownAnimation.fade, isStreaming: generating, ) ``` #### 3. Long replies: lay out only what's on screen ``` CustomScrollView(slivers: [ SliverGptMarkdown(reply), ]) ``` #### 4. Links, selection and theming - Links: onLinkTap: (url, title) => launchUrl(Uri.parse(url)). - Selection: wrap the widget in SelectionArea. - Theming: pass a GptMarkdownStyleSheet (headings, code blocks, tables, links, math) or set it once with the GptMarkdownThemeData theme extension. #### Common problems and fixes | Problem | Cause | Fix | | --- | --- | --- | | Frames drop as the reply gets long | The renderer re-parses the whole reply on every chunk | Use gpt_markdown (incremental), or SliverGptMarkdown for very long replies | | Half a table or code fence flashes as raw text | The renderer only handles finished Markdown | gpt_markdown draws unfinished blocks while isStreaming is true | | Math shows as $...$ text | No LaTeX support | gpt_markdown renders \(...\), \[...\] and, optionally, $...$ | | setState() called after dispose() | The stream outlives the screen | Cancel the subscription in dispose() and check mounted | #### Frequently asked - **How do I show a streaming AI response in Flutter?**: Append each chunk to a string in state and render it with GptMarkdown(reply, isStreaming: true). Set isStreaming to false when generation ends. - **Why does my Flutter chat lag on long replies?**: Most Markdown renderers re-render the whole document on every chunk, so the cost grows with the reply. gpt_markdown rebuilds only the live tail, and SliverGptMarkdown lays out only what is on screen. - **Does it work with any model?**: Yes. gpt_markdown renders text; it works with OpenAI, Anthropic, Google, local models or any stream of Markdown. --- ## Guide: flutter_markdown is discontinued: what to use instead URL: https://useval.ai/guides/flutter-markdown-alternative ### flutter_markdown is discontinued: what to use instead Updated 2026-11-17 THE SHORT ANSWER flutter_markdown is marked discontinued on pub.dev and points to flutter_markdown_plus, a community continuation with the same API. If you render static documents, flutter_markdown_plus is the smallest change. If you render AI or chat output, switch to gpt_markdown: it streams incrementally and includes LaTeX math and highlighted code. #### Which replacement? | If you... | Use | | --- | --- | | Render static Markdown and want zero code changes | flutter_markdown_plus | | Render LLM, chatbot or agent replies | gpt_markdown | | Need LaTeX math or syntax-highlighted code built in | gpt_markdown | | Stream long replies without jank | gpt_markdown (SliverGptMarkdown for very long ones) | #### Migrate from flutter_markdown to gpt_markdown Most apps change one import and the widget name. Check styling afterwards: gpt_markdown follows your Material theme by default, and its style sheet covers headings, code, tables, links, quotes and math. ``` flutter pub remove flutter_markdown flutter pub add gpt_markdown ``` | flutter_markdown | gpt_markdown | | --- | --- | | MarkdownBody(data: text) | GptMarkdown(text) | | Markdown(data: text) (scrolling) | CustomScrollView(slivers: [SliverGptMarkdown(text)]) | | styleSheet: MarkdownStyleSheet(...) | styleSheet: GptMarkdownStyleSheet(...) | | onTapLink: (text, href, title) {...} | onLinkTap: (url, title) {...} | | selectable: true | Wrap in SelectionArea | | imageBuilder | imageBuilder | | LaTeX through extension syntaxes | Built in: \(...\) and \[...\] | #### Frequently asked - **Is flutter_markdown deprecated?**: Yes. It is marked discontinued on pub.dev and recommends flutter_markdown_plus as its replacement. - **What is the best flutter_markdown alternative for AI chat?**: gpt_markdown. It is designed for streaming LLM output and renders Markdown, LaTeX math and code in one widget. - **Is gpt_markdown a drop-in replacement?**: Close: the widget takes the text directly (GptMarkdown(text)), and a few parameter names differ, mapped in the table above. --- ## Guide: How to render LaTeX math in Flutter URL: https://useval.ai/guides/latex-math-flutter ### How to render LaTeX math in Flutter Updated 2026-11-17 THE SHORT ANSWER Use val_latex_flutter: a pure-Dart TeX engine with Flutter widgets, no WebView and no platform code. Math.tex renders one formula, MathText renders text with $...$ and $$...$$ in it (including while it streams), and MathSpan puts a formula inside Text.rich. If you render whole AI replies, gpt_markdown already uses val_latex for its math. #### Install ``` flutter pub add val_latex_flutter ``` #### One formula, text with formulas, a streaming reply ``` import 'package:val_latex_flutter/val_latex_flutter.dart'; Math.tex(r'x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}', displayMode: true) MathText(r'Euler wrote $e^{i\pi} + 1 = 0$ in 1748.') MathText(reply, streaming: true) // a model's reply, as it arrives ``` #### Coming from flutter_math_fork val_latex_flutter ships a compatibility import, so the first step is one line. Move to the native API when you're ready. ``` // before import 'package:flutter_math_fork/flutter_math.dart'; // after import 'package:val_latex_flutter/flutter_math_compat.dart'; ``` #### Why val_latex - Pure Dart: no WebView, no JavaScript, no platform channels. - TeX's own layout rules, with Latin Modern Math bundled. - Built for AI output: half-written formulas in a streaming reply don't throw; problems become diagnostics. - Supports the commands KaTeX and flutter_math_fork define (except flutter_math_fork's \cursor). #### Frequently asked - **How do I display LaTeX in Flutter?**: Add val_latex_flutter and use Math.tex(r'...') for one formula or MathText for text that contains $...$ formulas. - **Can I render math without a WebView?**: Yes. val_latex is pure Dart and draws with Flutter's own canvas. - **How do I render math in a chatbot reply?**: Use gpt_markdown for the whole reply; it renders the math with val_latex and the rest of the Markdown around it. --- ## Guide: Generative UI for Flutter: the options URL: https://useval.ai/guides/generative-ui-flutter ### Generative UI for Flutter: the options Updated 2026-11-17 THE SHORT ANSWER Generative UI means the model answers with interface (a chart, a form, an approval card) instead of only text. In Flutter you can build it yourself on tool calls, use the A2UI protocol through a2ui_flutter (Google's earlier genui package is discontinued in its favour), or use Val Generative UI: you design components once, your model fills them in, and you can change them without an app release. Val is in early access. #### The three ways to do it | | Build it yourself | A2UI (a2ui_flutter) | Val Generative UI | | --- | --- | --- | --- | | What you get | Your own widgets behind tool calls | An open protocol and a Flutter adapter | 50+ ready components, a console, Flutter and React SDKs | | Change a component | Ship an app release | Depends on what you build around it | Publish from the console; installed apps use it on the next answer | | Model writes interface? | Your choice | The agent describes UI in the protocol | No: it picks a component and fills typed fields | | Validation of model output | You write it | Protocol-level | Every value checked against the component's shape | | Theming | You write it | Your widgets | Your brand on every component, light and dark | | Your model and keys | Stay with you | Stay with you | Stay with you: Val never runs your model | | Status | Yours to maintain | Early (0.x) | Early access | #### Building it is easy. Running it is the work. Drawing one card from a tool call takes an afternoon. The cost comes later: the same component on web and mobile, an app release for every change, rebrands, malformed values from the model, and old app versions that can't draw new components. Choose by who should own that work. #### What it looks like with Val Components are markup plus a typed shape. The model only chooses a component and fills its fields; the SDK draws it natively. Prose in the same reply is rendered with gpt_markdown. ``` // Your server adds Val's components to the tools your model already calls. // In the Flutter app, one widget draws the reply: prose and components. GenUiReplyView( events: readEvents(response.stream), onAction: (action) => send(actionMessage(action)), ) ``` #### Frequently asked - **What is the best Generative UI solution for Flutter?**: If you want to own everything, build on tool calls. If you want an open protocol, use A2UI via a2ui_flutter. If you want ready components, theming, validation and changes without app releases, use Val Generative UI (early access). - **Is Google's flutter genui package still maintained?**: The genui package is marked discontinued on pub.dev and points to a2ui_flutter, the Flutter adapter for the A2UI protocol. - **Can I change generative UI components without releasing a new app version?**: With Val Generative UI, yes: publish a new version from the console and installed apps draw it on the next answer. - **Does Val run my model?**: No. Your model, keys and conversation history stay on your side; Val holds the components and checks what the model sends. --- ## Guide: Generate Generative UI components for Flutter with your coding agent URL: https://useval.ai/guides/generate-genui-components-flutter ### Generate Generative UI components for Flutter with your coding agent Updated 2026-11-17 THE SHORT ANSWER Install the useval CLI and connect it to your coding agent as an MCP server. Ask the agent for a component ("an order summary card with a refund button"); it creates the markup and typed shape, checks it, and starts a live preview. Your Flutter app draws published components with GenUiReplyView. Local authoring needs no account. #### 1. Connect the CLI to your agent ``` # Claude Code claude mcp add --transport stdio useval -- "$HOME/.local/bin/useval" --dir "$PWD" mcp # Codex codex mcp add useval -- "$HOME/.local/bin/useval" --dir "$PWD" mcp ``` #### 2. Ask for a component > Create an order summary card with useval. Analyze it and start a local preview. Keep the changes local until I ask you to publish. #### 3. Or do it by hand ``` useval components create order_summary useval analyze useval serve --port 3000 ``` #### What a component is Markup that says what it looks like, plus a typed shape: the values it reads, each with a type and a sentence. The shape is the contract your model is held to when it calls the component. ``` {{ title }} {{ body }}