flutter_agentic_ui โ Chat UI for Flutter AI Agents
A drop-in chat screen for your AI agent. Message list with streaming bubbles, a ReAct tool-call visualizer, typing indicator, and input bar โ wired directly to a flutter_agentic AgenticAgent through one observable controller.
๐ View on pub.dev ยท API docs ยท GitHub
Part of the flutter_agentic family: flutter_agentic (core SDK) ยท flutter_agentic_graph ยท flutter_agentic_tools ยท flutter_agentic_memory
Installation
dependencies:
flutter_agentic_ui: ^0.1.1
A full agent chat screen in ~15 lines
import 'package:flutter_agentic/flutter_agentic.dart';
import 'package:flutter_agentic_ui/flutter_agentic_ui.dart';
class ChatScreen extends StatefulWidget { /* ... */ }
class _ChatScreenState extends State<ChatScreen> {
late final controller = AgenticChatController(
agent: AgenticAgent(
provider: GeminiProvider(apiKey: 'YOUR_KEY'),
tools: AgenticTools.all,
),
);
@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(title: const Text('Assistant')),
body: AgenticChatView(controller: controller),
);
@override
void dispose() { controller.dispose(); super.dispose(); }
}
That's it โ tool calls, the typing indicator, error bubbles, and auto-scroll all work out of the box.
What you get
| Widget | Purpose |
|---|---|
AgenticChatView |
complete chat screen: list + input bar + auto-scroll |
AgenticChatController |
ChangeNotifier driving the conversation; use it with any custom UI |
ChatBubble |
one message โ user/agent styling, error state, typing indicator while waiting |
AgentStepsView |
expandable "2 tool calls" trail showing the agent's ReAct steps |
ChatInputBar |
text field + send button, disables itself while the agent works |
TypingIndicator |
the classic three animated dots |
Streaming replies
AgenticChatView(controller: controller, streamResponses: true)
// or directly: controller.send('Tell me a story', stream: true);
Tokens render into the bubble as they arrive.
See what the agent did
Replies produced with tools show a collapsible step trail โ thinking, each tool call with its arguments, and each result:
โธ 2 tool calls
๐ง get_weather(city: Tokyo)
โ
get_weather โ {"temp": 23}
๐ง calculator(expression: 100^0.5)
โ
calculator โ {"result": 10}
Hide it with showSteps: false, or embed AgentStepsView(steps: ...) anywhere yourself.
Theming
AgenticChatView(
controller: controller,
theme: AgenticChatTheme(
userBubbleColor: Colors.indigo,
bubbleRadius: 20,
),
)
Unset values follow your app's ThemeData (Material 3 color scheme).
Bring your own UI
AgenticChatController is just a ChangeNotifier with messages, isBusy, send(), clear(), and loadHistory() โ drive any custom layout from it and skip the bundled widgets entirely.
License
MIT โ see LICENSE.
Libraries
- flutter_agentic_ui
- flutter_agentic_ui โ drop-in chat UI for Flutter AI agents.