stream_chat_flutter_core
10.7.0, released 11 days ago by getstream.io
Core Flutter SDK for Stream Chat providing business logic and controllers without UI.
Rock solid
What it does
It supplies controllers for channels, messages, users, polls, drafts and more, handling pagination and state management. Utilities like BetterStreamBuilder and LazyLoadScrollView help build custom chat interfaces on top of the Stream Chat client.
AI-written summary of version 10.6.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a fully custom chat UI and want to manage chat state yourself
- You want lightweight core functionality without the UI bundle of stream_chat_flutter
- You require pagination, draft handling, and other chat‑specific controllers
- You prefer minimal dependencies and platform‑agnostic setup
Skip it when
- You want ready‑made chat widgets and UI out of the box
- You are not using Stream Chat as the backend
- You need a generic state‑management solution unrelated to chat
Strengths
- Very low dependency footprint
- Comprehensive set of chat‑specific controllers and utilities
- Easy to integrate with the low‑level stream_chat client
- Works on all Flutter platforms
Weaknesses
- Only useful with Stream Chat backend
- No UI components, so you must build all widgets yourself
- Requires understanding of its controller APIs
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- Yes (build_runner)
- Direct dependencies
- 9
import 'package:flutter/material.dart';
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
final client = StreamChatClient('YOUR_API_KEY');
@override
Widget build(BuildContext context) {
return MaterialApp(
home: StreamChatCore(client: client, child: ChannelListPage()),
);
}
}
class ChannelListPage extends StatelessWidget {
final controller = StreamChannelListController();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Channels')),
body: PagedValueListenableBuilder(
controller: controller,
builder: (context, channels, _) => ListView.builder(
itemCount: channels.length,
itemBuilder: (_, i) => ListTile(title: Text(channels[i].name ?? 'Unnamed')),
),
),
);
}
}Works with
Packages commonly used together with stream_chat_flutter_core: ones it builds on, ones built on it, and its own family.
- package_info_plusstream_chat_flutter_core depends on itFlutter plugin to query app package info like version, build number and installer store.
- rxdartstream_chat_flutter_core depends on itImplementation of the ReactiveX API for asynchronous programming leveraging native Dart Streams.
- device_info_plusstream_chat_flutter_core depends on itProvides detailed information about the current device, make, model, and OS version.
- freezed_annotationstream_chat_flutter_core depends on itAnnotations for the freezed code-generator.
- connectivity_plusstream_chat_flutter_core depends on itDiscover the state of network connectivity (WiFi, mobile, ethernet) on Android, iOS, Web and desktops.
- rate_limiterstream_chat_flutter_core depends on itApply rate limiting strategies like debounce, throttle, and backoff to regular Dart functions.
- stream_chatstream_chat_flutter_core depends on itLow‑level Dart client for Stream Chat API
- stream_thumbnailSame familyCreate thumbnail images from local video files or URLs as bytes or files.