Skip to content

Repository files navigation

Integrating Stream Chat with AI

Flutter AI components by Stream

Pub CI

This repository holds stream_chat_flutter_ai — a standalone set of Flutter components for building LLM-driven chat experiences: streaming text, animated typing indicators, syntax-highlighted code blocks, charts, a purpose-built AI composer, and speech-to-text input.

The package has no dependency on stream_chat, stream_chat_flutter, or any other Stream Chat package — every widget operates on plain strings, callbacks, and controllers, so it can be dropped into any Flutter app or paired with any backend/LLM provider. Wiring it up to a Stream Chat channel is documented as an optional integration.

Quick Links

Packages

Package Pub Description
stream_chat_flutter_ai Pub AI chat UI components: StreamingMessageView, ChatComposer, AITypingIndicatorView, ChartView, CodeBlockView and more.

See the package README for the full component reference.

Getting Started

Add the package to your app:

dependencies:
  stream_chat_flutter_ai: ^0.1.0

Then render a streaming AI response:

import 'package:stream_chat_flutter_ai/stream_chat_flutter_ai.dart';

StreamingMessageView(
  text: markdownText, // updated in real time as chunks arrive
  typingSpeed: const Duration(milliseconds: 10),
);

There is a runnable showcase app in packages/stream_chat_flutter_ai/example — it needs no API key.

Repository layout

This is a Melos monorepo built on Dart pub workspaces, so there is a single shared dependency resolution and one pubspec.lock at the root.

dart pub global activate melos   # requires Dart >= 3.9
melos bootstrap                  # resolves the workspace
melos run analyze                # dart analyze --fatal-infos across the workspace
melos run format                 # dart format --set-exit-if-changed
melos run test:all               # flutter test --coverage
melos run update:goldens         # regenerate golden files

Contributing

See CONTRIBUTING.md.

🛥 What is Stream?

Stream allows developers to rapidly deploy scalable feeds, chat messaging and video with an industry leading 99.999% uptime SLA guarantee.

Stream provides UI components and state handling that make it easy to build real-time chat and video calling for your app. Stream runs and maintains a global network of edge servers around the world, ensuring optimal latency and reliability regardless of where your users are located.

📕 Tutorials

Stream's Chat SDK is natively supported across React, React Native, Angular, Jetpack Compose, SwiftUI, Flutter and Javascript. The sibling AI component libraries live in stream-chat-android-ai and stream-chat-swift-ai.

👩‍💻 Free for Makers 👨‍💻

Stream is free for most side and hobby projects. To qualify, your project/company needs to have < 5 team members and < $10k in monthly revenue. For more details, check out the Maker Account.

💼 We are hiring!

We've recently closed a $38 million Series B funding round and we keep actively growing. Check out our current openings and apply via Stream's website.

License

Released under the Stream Source Code License Agreement. See LICENSE for the full text.

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages