Getting started
Install flow_ui, wire the theme, and render your first conversation.
Flow UI is an open-source Flutter UI library to build production-grade Chat & AI assistant interfaces — a plain Flutter package, no codegen, no transitive dependency tree. Its components draw the conversation state you hand them and report what the user did through callbacks; everything model-shaped stays in your app.
Install
Section titled “Install”One line in your pubspec — the package depends on nothing but the Flutter SDK:
dependencies: flow_ui: ^0.1.0Wire the theme
Section titled “Wire the theme”The design tokens — colors and typography — install as a ThemeExtension:
MaterialApp( theme: ThemeData(extensions: [FlowTheme.light()]), darkTheme: ThemeData( brightness: Brightness.dark, extensions: [FlowTheme.dark()], ),)Figtree — the face the design system is set in — ships inside the package,
so there is nothing to add to your own pubspec.yaml fonts section.
Render a conversation
Section titled “Render a conversation”Messages are plain data; FlowThread draws them:
FlowThread( messages: [ FlowMessageData.text( id: '1', role: FlowMessageRole.user, text: 'What is flow_ui?', ), FlowMessageData.text( id: '2', role: FlowMessageRole.assistant, text: 'An open-source Flutter UI library to build production-grade Chat & AI assistant interfaces...', ), FlowMessageData.text( id: '3', role: FlowMessageRole.system, text: 'Model changed to Sonnet', ), ],)Streaming is data, not streams: as chunks arrive, rebuild with the updated
message list and a status of FlowMessageStatus.streaming — the thread
animates the reveal.
Run the playground
Section titled “Run the playground”Every component has a live stage in the hosted playground — variant pills and code snippets included. It is also in the repo to run locally:
cd playground && flutter run -d chromeFor a minimal starting point, the repo’s example/ is the full chat screen
from the README as a single-file app: generate platform runners once with
flutter create . --platforms=web, then flutter run -d chrome.