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.