Installation
Choosing The Right Flutter Package
Why the SDK is split into different packages
Different applications need different levels of customization and integration with the Stream Chat SDK. To do this, the Flutter SDK is split into three different packages which build upon the last and give varying levels of control to the developer. The higher level packages offer better compatibility out of the box while the lower level SDKs offer fine grained control. There is also a separate package for persistence which allows you persist data locally which works with all packages.
How do I choose?
The case for stream_chat_flutter
For the quickest way to integrate Stream Chat with your app, the UI SDK (stream_chat_flutter
) is the
way to go. stream_chat_flutter
contains prebuilt components that manage most operations like data
fetching, pagination, sending a message, and more. This ensures you have a nearly out-of-the-box
experience adding chat to your applications. It is also possible to use this in conjunction with
lower level operations of the SDK to get the best of both worlds.
The package allows customization of components to a large extent making it easy to tweak the theme to match your app colors and such. If you require any additional feature or customization, feel free to request this through our support channels.
Summary:
For the quickest and easiest way to add Chat to your app with prebuilt UI components, use stream_chat_flutter
The case for stream_chat_flutter_core
If your application involves UI that does not fit in with the stream_chat_flutter
components, stream_chat_flutter_core
strips away the UI associated with the components and provides the data fetching and manipulation
capabilities while supplying builders for UI. This allows you to implement your own UI and themes
completely independently while not worrying about writing functions for data and pagination.
Summary:
For implementing your own custom UI while not having to worry about lower level API calls, use stream_chat_flutter_core
.
The case for stream_chat
The stream_chat
package is the Low-level Client (LLC) of Stream Chat in Flutter. This package wraps
the underlying functionality of Stream Chat and allows the most customization in terms of UI, data,
and architecture.
Summary:
For the most control over the SDK and dealing with low level calls to the API, use stream_chat
.
Versioning Policy
All of the Stream Chat packages follow semantic versioning.
That means that with a version number x.y.z (major.minor.patch):
- When releasing bug fixes (backwards compatible), we make a patch release by changing the z number (ex: 3.6.2 to 3.6.3). A bug fix is defined as an internal change that fixes incorrect behavior.
- When releasing new features or non-critical fixes, we make a minor release by changing the y number (ex: 3.6.2 to 3.7.0).
- When releasing breaking changes (backward incompatible), we make a major release by changing the x number (ex: 3.6.2 to 4.0.0).
See the semantic versioning section from the Dart docs for more information.
This versioning policy does not apply to prerelease packages (below major version of 1). See this StackOverflow thread for more information on Dart package versioning.
Whenever possible, we will add deprecation warnings in preparation for future breaking changes.