How flutter/ai works
Flutter AI Toolkit is a set of embeddable Flutter chat widgets backed by a pluggable LLM-provider API. A user chats through the chat view; the configured provider supplies model responses, with Firebase AI available as a built-in integration. The documented feature set also includes streaming and multi-turn chat, rich text, voice input, attachments, conversation serialization, and extensive styling. No source excerpts were supplied, so internal calls and feature wiring are unverified; dashed, uncited edges mark those connections.
Main entry points: llm_chat_view.dart Chat view · chat_input.dart Chat input · firebase_provider.dart Firebase provider · llm_message_view.dart Message views
Components 16
Chat experience
- Chat view
lib/src/views/llm_chat_view/llm_chat_view.dart - Chat input
lib/src/views/chat_input/chat_input.dart - Voice input
lib/src/views/chat_input/text_or_audio_input.dart - Attachments
lib/src/views/chat_input/attachments_view.dart - Message views
lib/src/views/chat_message_view/llm_message_view.dart - Response rendering
lib/src/views/response_builder.dart
Chat state
- Chat model
lib/src/chat_view_model/chat_view_model.dart - Provider client
lib/src/chat_view_model/chat_view_model_client.dart - Chat history
lib/src/views/chat_history_view.dart
LLM providers
- Provider API
lib/src/providers/interface/llm_provider.dart - Firebase provider
lib/src/providers/implementations/firebase_provider.dart - Echo provider
lib/src/providers/implementations/echo_provider.dart
Customization
- Chat styling
lib/src/styles/llm_chat_view_style.dart - Custom strings
lib/src/strings/llm_chat_view_strings.dart
Other components
- Chat user
- Firebase AI
Connections 15
- Chat user → Chat view: chats in
README.md - Chat view → Firebase provider: configures provider
README.md - Firebase provider → Firebase AI: uses model
README.md - Chat view → Chat model: manages turns
- Chat model → Provider client: dispatches requests
- Provider client → Provider API: calls provider
- Firebase provider → Provider API: implements API
- Chat view → Chat input: accepts prompts
- Chat input → Voice input: offers voice
- Chat input → Attachments: adds media
- Chat view → Message views: shows messages
- Message views → Response rendering: renders rich text
- Chat view → Chat history: supports serialization
- Chat view → Chat styling: applies styling
- Chat view → Custom strings: uses custom strings