Flutter Chat Components
The official Flutter components for Stream Chat, a service for building chat applications.
Quick Links
Flutter Chat Tutorial
The best place to start is the Flutter Chat Tutorial . It teaches you how to use this SDK and also shows how to make common changes.
Example App
This repo includes a fully functional example app with setup instructions. The example is available under the example folder.
Add dependency
dependencies:
stream_chat_flutter: ^0.1.21
You should then run flutter packages get
Alpha version
Use version ^0.2.0-alpha+1 to use the latest available version.
Note that this is still an alpha version. There may be some bugs and the api can change in breaking ways.
Thanks to whoever tries these versions and reports bugs or suggestions.
Android
All set
iOS
The library uses flutter file picker plugin to pick files from the os. Follow this wiki to fulfill iOS requirements.
We also use video_player to reproduce videos. Follow this guide to fulfill the requirements.
To pick images from the camera we use the image_picker plugin. Follow these instructions to check the requirements.
Docs
Business logic components
We provide 2 Widgets dedicated to business logic and state management:
UI Components
These are the available Widgets that you can use to build your application UI. Every widget uses the StreamChat or StreamChannel widgets to manage the state and communicate with Stream services.
Customizing styles
The Flutter SDK comes with a fully designed set of widgets which you can customize to fit with your application style and typography. Changing the theme of Chat widgets works in a very similar way that MaterialApp and Theme do.
Out of the box all chat widgets use their own default styling, there are two ways to change the styling:
Initialize the StreamChatTheme from your existing MaterialApp style
class MyApp extends StatelessWidget {
final Client client;
MyApp(this.client);
@override
Widget build(BuildContext context) {
final theme = ThemeData(
primarySwatch: Colors.green,
);
return MaterialApp(
theme: theme,
home: Container(
child: StreamChat(
streamChatThemeData: StreamChatThemeData.fromTheme(theme),
client: client,
child: ChannelListPage(),
),
),
);
}
}
Construct a custom theme and provide all the customizations needed
class MyApp extends StatelessWidget {
final Client client;
MyApp(this.client);
@override
Widget build(BuildContext context) {
final theme = ThemeData(
primarySwatch: Colors.green,
);
return MaterialApp(
theme: theme,
home: Container(
child: StreamChat(
streamChatThemeData: StreamChatThemeData.fromTheme(theme).copyWith(
ownMessageTheme: MessageTheme(
messageBackgroundColor: Colors.black,
messageText: TextStyle(
color: Colors.white,
),
avatarTheme: AvatarTheme(
borderRadius: BorderRadius.circular(8),
),
),
),
client: client,
child: ChannelListPage(),
),
),
);
}
}
Contributing
We welcome code changes that improve this library or fix a problem, please make sure to follow all best practices and add tests if applicable before submitting a Pull Request on Github. We are very happy to merge your code in the official repository. Make sure to sign our Contributor License Agreement (CLA) first. See our license file for more details.
Download Stream Chat source code on GitHub
Flutter Chat SDK – Build your own chat app experience using Dart, Flutter and the Stream Chat Messaging API. https://github.com/GetStream/stream-chat-flutter 388 forks. 1,056 stars. 28 open issues. Recent commits: chore(samples): match the sample app's native files to the Flutter 3.44 template (#3079)Move the Android project to AGP 9.0.1 and KGP 2.3.20, stop applyingkotlin-android in the app module, set the JVM target in a top-level`kotlin` block, use Flutter's NDK version, and drop Jetifier and theplugin namespace workaround. On web, use the non-deprecated`mobile-web-app-capable` tag and stop loading the legacy `flutter.js`.Refs FLU-813Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> , GitHub docs(repo): sync the sample app's native files with the floor's Flutter template (#3078)* docs(repo): move the sample app to built-in Kotlin in the 3.47 floor raiseAdd a Track B step to the flutter-version-bump skill: once the floorreaches Flutter 3.47, move sample_app to AGP 9 with built-in Kotlin,keeping KGP on the classpath and leaving newDsl off.Refs FLU-813Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>* docs(repo): sync the sample app's native files with the floor's templateReplace the hand-written built-in Kotlin step with a generic one: on eachfloor raise, generate a `flutter create` reference app with the floor'sSDK and match sample_app's native files to it, keeping only deliberatedifferences. The 3.47 template stays as a worked example.Refs FLU-813Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>* docs(repo): verify on the floor's SDK and base the example on the 3.44 templateBuild with `$FLOOR/bin/flutter` so the check runs on the floor rather thanwhatever is on PATH, and say that a plugin floor goes in melos.yaml andreaches the pubspecs through `melos bootstrap`. List the sample app'sdeliberate differences per platform, and replace the 3.47 worked examplewith the 3.44 one: the 3.44 template is already on AGP 9, so the move doesnot wait for a floor raise.Refs FLU-813Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>———Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> , GitHub chore(ui): raise desktop_drop and photo_manager floors and allow record 7 (#3075)Raise `desktop_drop` to 0.8.4 and `photo_manager` to 3.11.0, the firstreleases that read `android.builtInKotlin`, so apps on AGP 9 with built-inKotlin cannot resolve a version that fails to build. Allow `record` 7.xalongside 6.x.Refs FLU-813Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> , GitHub perf(llc, ui): skip no-op users updates and floating date divider rebuilds (#3072) , GitHub feat(ui): adapt the message bubble and media grids to wide screens (#3034)* fix(ui): default StreamMessageItem.maxWidth to 272, like its propsStreamMessageItem defaulted maxWidth to 264 while StreamMessageItemPropsdefaulted it to 272. The message list builds props directly, so it used272, while anything built with the StreamMessageItem constructor, such asthe long-press actions preview, was 8 pixels narrower.272 is the width the design gives a bubble holding an attachment: a 256attachment with 8 of padding on each side. A lower cap squeezes it.Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>Claude-Session: https://claude.ai/code/session_01AP6bV4L7FQYjHoHZeomLxr* feat(ui): show more media tiles per row on wider screensStreamMediaGallery and StreamPhotoGallery always showed 3 tiles per row,so a wide screen got huge tiles and, on a foldable's inner display, acolumn straddling the fold. They now show 3 tiles per row when narrowerthan 600, 4 when narrower than 840 and 6 otherwise. The counts from 600up are even, so the tiles split evenly at a fold.StreamMediaGallery gains a gridDelegate to change the layout, and itscrossAxisCount is deprecated, since one count no longer describes thegrid. defaultStreamPhotoGalleryDelegate keeps its 3-column layout butis deprecated, as it is no longer the default.Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>Claude-Session: https://claude.ai/code/session_01AP6bV4L7FQYjHoHZeomLxr* refactor(ui): make the adaptive grid the photo gallery's default delegatedefaultStreamPhotoGalleryDelegate now holds the grid that shows more tilesper row as it gets wider, instead of staying a deprecated three-columndelegate beside a new default. The grid docs describe that behaviourrather than the breakpoints behind it.Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>Claude-Session: https://claude.ai/code/session_01AP6bV4L7FQYjHoHZeomLxr* docs(ui): keep the FLU-825 changelog to what upgraders can seeDrop the StreamMessageItem.maxWidth entry, since the message list alreadyused 272, and describe the photo gallery's default by what it showsrather than by its type.Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>Claude-Session: https://claude.ai/code/session_01AP6bV4L7FQYjHoHZeomLxr* chore: Update Goldens* refactor(ui): name the media grid's width breakpointsCo-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>* docs(ui): note StreamMessageItem's new maxWidth default in the changelogCo-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>* test(ui): cover the media grid's breakpoints and the gallery's delegate assertCo-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>* fix(ui): declare defaultStreamPhotoGalleryDelegate as a SliverGridDelegateIts type was inferred from the delegate behind it, so switching to the adaptive grid changed the public type to one that isn't exported.Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>* docs(repo): declare public defaults with the type their consumers acceptCo-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>* docs(repo): note the lint also misses an inferred top-level finalCo-authored-by: renefloor <renefloor@users.noreply.github.com>Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>———Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>Co-authored-by: xsahil03x <25670178+xsahil03x@users.noreply.github.com> , GitHub
Provides the list of the opensource Flutter apps collection with GitHub repository.