replit_ui
Flutter UI library · AI chat interfaces
Reusable Flutter chat components and an optional streaming SDK for AI assistants.
Inside the project
Overview
replit_ui is an open-source Flutter package for building production-grade chat and AI assistant interfaces. The package combines a composable UI toolkit with an optional streaming SDK, so an app can use the widgets with its own backend or opt into the bundled provider integrations.
Highlights
- Build chat screens from reusable thread, message, composer, and conversation-list components.
- Render streaming responses, Markdown, code, attachments, tool calls, confirmations, and error states.
- Use the optional SDK with Gemini, OpenAI-compatible APIs, or Anthropic Claude.
- Customize appearance with light and dark themes, typography, and component-level overrides.
A complete chat interface toolkit
The main chat view brings the conversation thread and composer together, including an initial empty state, suggested prompts, a jump-to-latest control, and web drag-and-drop support.
Individual components can also be used independently. Messages support typed content parts, and custom-part builders let an app render its own content such as citations, charts, or domain-specific cards.
- Conversation threads, message bubbles, and conversation-history lists.
- Composer controls for sending, stopping, attachments, and app-provided actions.
- Markdown and highlighted code blocks, plus streaming and thinking indicators.
- Tool-call, confirmation, error, and retry states.
- Attachment tiles and previews, prompt suggestions, menus, model selection, and toast notices.
Optional streaming SDK
The UI package does not require a model provider. Apps can connect their own services through callbacks, or use the optional SDK to stream responses with Gemini, OpenAI-compatible services, or Anthropic Claude.
The SDK handles streaming, cancellation, retry, attachment history, and tool calls. Provider requests are opt-in; production apps should keep provider credentials on a server they control rather than shipping API keys in a public client.
Integration and customization
The package is designed to fit into an existing Flutter app: the host app owns its scaffold, localization, and application-specific actions. Components can be composed directly, and message content can be extended with app-defined parts.
- Light and dark theme presets with overridable colors and typography.
- Component-level layout overrides and host-provided interface strings.
- Platform file picking, image paste, and drag-and-drop attachment support on web.
- A live playground where each component can be explored with variants and code examples.
Explore the project
- Web replit.asimawdah.com
- Playground replit.asimawdah.com/playground
- pub.dev pub.dev/packages/replit_ui
- GitHub github.com/asimawdah/replit_ui