@@ -1,6 +1,15 @@
|
|||||||
# Stream Chat Dart
|
# Official Flutter packages for [Stream Chat](https://getstream.io/chat/)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
[](https://gitter.im/GetStream/stream-chat-flutter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||||
|

|
||||||
|
|
||||||
|
**Quick Links**
|
||||||
|
|
||||||
|
- [Register](https://getstream.io/chat/trial/) to get an API key for Stream Chat
|
||||||
|
- [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/)
|
||||||
|
- [Chat UI Kit](https://getstream.io/chat/ui-kit/)
|
||||||
|
|
||||||
This repository contains code for our [Dart](https://dart.dev/) and [Flutter](https://flutter.dev/) chat clients.
|
This repository contains code for our [Dart](https://dart.dev/) and [Flutter](https://flutter.dev/) chat clients.
|
||||||
|
|
||||||
@@ -15,45 +24,28 @@ To get started, run `bootstrap` after cloning the project.
|
|||||||
melos bootstrap
|
melos bootstrap
|
||||||
```
|
```
|
||||||
|
|
||||||
## Available Commands
|
## Packages
|
||||||
### Analyze
|
We provide a variety of packages depending on the level of customization you want to achieve.
|
||||||
> Requires `tuneup` to be activated globally. Please see https://pub.dev/packages/tuneup
|
|
||||||
```shell
|
|
||||||
melos run analyze
|
|
||||||
```
|
|
||||||
|
|
||||||
### Pub Lint
|
### [stream_chat](https://github.com/GetStream/stream-chat-flutter/tree/master/packages/stream_chat)
|
||||||
Runs pub publish with ``--dry-run``
|
A pure Dart package that can be used on any Dart project. It provides a low-level client to access the Stream Chat service.
|
||||||
```shell
|
|
||||||
melos run lint:pub
|
|
||||||
```
|
|
||||||
|
|
||||||
### Build iOS
|
### [stream_chat_persistence](https://github.com/GetStream/stream-chat-flutter/tree/master/packages/stream_chat_persistence)
|
||||||
Builds iOS examples without codesign
|
This package provides a persistence client for fetching and saving chat data locally. Stream Chat Persistence uses Moor as a disk cache.
|
||||||
```shell
|
|
||||||
melos run build:examples:ios
|
|
||||||
```
|
|
||||||
|
|
||||||
### Build APK
|
### [stream_chat_flutter_core](https://github.com/GetStream/stream-chat-flutter/tree/master/packages/stream_chat_flutter_core)
|
||||||
Builds an Android APK for examples
|
This package provides business logic to fetch common things required for integrating Stream Chat into your application. The `core` package allows more customisation and hence provides business logic but no UI components.
|
||||||
```shell
|
|
||||||
melos run build:examples:android
|
|
||||||
```
|
|
||||||
|
|
||||||
### Build MACOS
|
### [stream_chat_flutter](https://github.com/GetStream/stream-chat-flutter/tree/master/packages/stream_chat_flutter)
|
||||||
Builds MacOs for all examples
|
This library includes both a low-level chat SDK and a set of reusable and customizable UI components.
|
||||||
```shell
|
|
||||||
melos run build:examples:macos
|
|
||||||
```
|
|
||||||
|
|
||||||
### Test
|
## Flutter Chat Tutorial
|
||||||
Runs `flutter test` on all packages
|
|
||||||
```shell
|
|
||||||
melos run test
|
|
||||||
```
|
|
||||||
|
|
||||||
### Test Web
|
The best place to start is the [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/).
|
||||||
Runs `flutter test --platform=chrome` on all packages
|
It teaches you how to use this SDK and also shows how to make frequently required changes.
|
||||||
```shell
|
|
||||||
melos run test:web
|
## Example Apps
|
||||||
```
|
|
||||||
|
Every package folder includes a fully functional example with setup instructions.
|
||||||
|
|
||||||
|
We also provide a set of sample apps created using the Stream Flutter SDK at [this location](https://github.com/GetStream/flutter-samples).
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 564 KiB |
@@ -1,20 +1,30 @@
|
|||||||
# Stream Chat Dart
|
# Official Dart Client for [Stream Chat](https://getstream.io/chat/)
|
||||||
|
|
||||||
|
>The official Dart client for Stream Chat, a service for building chat applications. This library can be used on any Dart project and on both mobile and web apps with Flutter.
|
||||||
|
|
||||||
[](https://pub.dartlang.org/packages/stream_chat)
|
[](https://pub.dartlang.org/packages/stream_chat)
|
||||||

|

|
||||||

|
[](https://gitter.im/GetStream/stream-chat-flutter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||||
[](https://codecov.io/gh/GetStream/stream-chat-dart)
|

|
||||||
|
|
||||||
stream-chat-dart is the official Dart client for Stream Chat, a service for building chat applications. This library can be used on any Dart project and on both mobile and web apps with Flutter.
|
**Quick Links**
|
||||||
|
|
||||||
You can sign up for a Stream account at https://getstream.io/chat/
|
- [Register](https://getstream.io/chat/trial/) to get an API key for Stream Chat
|
||||||
|
- [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/)
|
||||||
|
- [Chat UI Kit](https://getstream.io/chat/ui-kit/)
|
||||||
|
|
||||||
|
### Changelog
|
||||||
|
|
||||||
|
Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat/changelog) to see the latest changes in the package.
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
### Add dependency
|
### Add dependency
|
||||||
|
Add this to your package's pubspec.yaml file, use the latest version [](https://pub.dartlang.org/packages/stream_chat)
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
dependencies:
|
dependencies:
|
||||||
stream_chat: ^1.0.0-beta
|
stream_chat: ^latest-version
|
||||||
```
|
```
|
||||||
|
|
||||||
You should then run `flutter packages get`
|
You should then run `flutter packages get`
|
||||||
@@ -70,7 +80,7 @@ final client = StreamChatClient(
|
|||||||
)..chatPersistenceClient = CustomChatPersistentClient();
|
)..chatPersistenceClient = CustomChatPersistentClient();
|
||||||
```
|
```
|
||||||
|
|
||||||
We provide an official persistent client in the (stream_chat_persistence)[https://pub.dev/packages/stream_chat_persistence] package.
|
We provide an official persistent client in the [stream_chat_persistence](https://pub.dev/packages/stream_chat_persistence) package.
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
import 'package:stream_chat_persistence/stream_chat_persistence.dart';
|
import 'package:stream_chat_persistence/stream_chat_persistence.dart';
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# Official Flutter SDK for [Stream Chat](https://getstream.io/chat/)
|
# Official Flutter SDK for [Stream Chat](https://getstream.io/chat/)
|
||||||
|
|
||||||
<p align="center">
|

|
||||||
<a href="https://getstream.io/chat/flutter/tutorial/"><img src="https://i.imgur.com/L4Mj8S2.png" alt="Flutter Chat" width="60%" /></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
> The official Flutter components for Stream Chat, a service for
|
> The official Flutter components for Stream Chat, a service for
|
||||||
> building chat applications.
|
> building chat applications.
|
||||||
@@ -10,8 +8,7 @@
|
|||||||
[](https://pub.dartlang.org/packages/stream_chat_flutter)
|
[](https://pub.dartlang.org/packages/stream_chat_flutter)
|
||||||

|

|
||||||
[](https://gitter.im/GetStream/stream-chat-flutter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
[](https://gitter.im/GetStream/stream-chat-flutter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||||

|

|
||||||
<img align="right" src="https://getstream.imgix.net/images/ios-chat-tutorial/iphone_chat_art@1x.png?auto=format,enhance" width="50%" />
|
|
||||||
|
|
||||||
**Quick Links**
|
**Quick Links**
|
||||||
|
|
||||||
@@ -19,6 +16,11 @@
|
|||||||
- [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/)
|
- [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/)
|
||||||
- [Chat UI Kit](https://getstream.io/chat/ui-kit/)
|
- [Chat UI Kit](https://getstream.io/chat/ui-kit/)
|
||||||
|
|
||||||
|
|
||||||
|
### Changelog
|
||||||
|
|
||||||
|
Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat_flutter/changelog) to see the latest changes in the package.
|
||||||
|
|
||||||
## Flutter Chat Tutorial
|
## Flutter Chat Tutorial
|
||||||
|
|
||||||
The best place to start is the [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/).
|
The best place to start is the [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/).
|
||||||
@@ -61,8 +63,8 @@ If it seems related to the [flutter file picker plugin](https://github.com/migue
|
|||||||
## Docs
|
## Docs
|
||||||
|
|
||||||
This package provides UI components required for integrating Stream Chat into your application.
|
This package provides UI components required for integrating Stream Chat into your application.
|
||||||
Alternatively, you may use the core package (stream_chat_flutter_core) which allows more customisation and provides business logic but no UI components.
|
Alternatively, you may use the core package [stream_chat_flutter_core](https://github.com/GetStream/stream-chat-flutter/tree/master/packages/stream_chat_flutter_core) which allows more customisation and provides business logic but no UI components.
|
||||||
If you require the maximum amount of control over the API, please use the low level client package: stream_chat.
|
If you require the maximum amount of control over the API, please use the low level client package: [stream_chat](https://github.com/GetStream/stream-chat-flutter/tree/master/packages/stream_chat).
|
||||||
|
|
||||||
### UI Components
|
### UI Components
|
||||||
|
|
||||||
@@ -152,9 +154,34 @@ Out of the box, all chat widgets use their default styling, and there are two wa
|
|||||||
|
|
||||||
### Offline storage
|
### Offline storage
|
||||||
|
|
||||||
By default the library saves information about channels and messages in a SQLite DB.
|
To add data persistance you can extend the class `ChatPersistenceClient` and pass an instance to the `StreamChatClient`.
|
||||||
|
|
||||||
Set the property `persistenceEnabled` to false if you don't want to use the offline storage.
|
```dart
|
||||||
|
class CustomChatPersistentClient extends ChatPersistenceClient {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
final client = StreamChatClient(
|
||||||
|
apiKey ?? kDefaultStreamApiKey,
|
||||||
|
logLevel: Level.INFO,
|
||||||
|
)..chatPersistenceClient = CustomChatPersistentClient();
|
||||||
|
```
|
||||||
|
|
||||||
|
We provide an official persistent client in the (stream_chat_persistence)[https://pub.dev/packages/stream_chat_persistence] package.
|
||||||
|
|
||||||
|
```dart
|
||||||
|
import 'package:stream_chat_persistence/stream_chat_persistence.dart';
|
||||||
|
|
||||||
|
final chatPersistentClient = StreamChatPersistenceClient(
|
||||||
|
logLevel: Level.INFO,
|
||||||
|
connectionMode: ConnectionMode.background,
|
||||||
|
);
|
||||||
|
|
||||||
|
final client = StreamChatClient(
|
||||||
|
apiKey ?? kDefaultStreamApiKey,
|
||||||
|
logLevel: Level.INFO,
|
||||||
|
)..chatPersistenceClient = chatPersistentClient;
|
||||||
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
# Official Flutter SDK Core for [Stream Chat](https://getstream.io/chat/)
|
# Official Core Flutter SDK for [Stream Chat](https://getstream.io/chat/)
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://getstream.io/chat/flutter/tutorial/"><img src="https://i.imgur.com/L4Mj8S2.png" alt="Flutter Chat" width="60%" /></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
> The official Flutter core components for Stream Chat, a service for
|
> The official Flutter core components for Stream Chat, a service for
|
||||||
> building chat applications.
|
> building chat applications.
|
||||||
@@ -10,8 +6,7 @@
|
|||||||
[](https://pub.dartlang.org/packages/stream_chat_flutter)
|
[](https://pub.dartlang.org/packages/stream_chat_flutter)
|
||||||

|

|
||||||
[](https://gitter.im/GetStream/stream-chat-flutter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
[](https://gitter.im/GetStream/stream-chat-flutter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||||

|

|
||||||
<img align="right" src="https://getstream.imgix.net/images/ios-chat-tutorial/iphone_chat_art@1x.png?auto=format,enhance" width="50%" />
|
|
||||||
|
|
||||||
**Quick Links**
|
**Quick Links**
|
||||||
|
|
||||||
@@ -19,6 +14,10 @@
|
|||||||
- [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/)
|
- [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/)
|
||||||
- [Chat UI Kit](https://getstream.io/chat/ui-kit/)
|
- [Chat UI Kit](https://getstream.io/chat/ui-kit/)
|
||||||
|
|
||||||
|
### Changelog
|
||||||
|
|
||||||
|
Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat_flutter_core/changelog) to see the latest changes in the package.
|
||||||
|
|
||||||
## Flutter Chat Tutorial
|
## Flutter Chat Tutorial
|
||||||
|
|
||||||
The best place to start is the [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/).
|
The best place to start is the [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/).
|
||||||
|
|||||||
@@ -1,21 +1,27 @@
|
|||||||
# Official Chat Persistence Client for [Stream Chat](https://getstream.io/chat/)
|
# Official Chat Persistence Client for [Stream Chat](https://getstream.io/chat/)
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://getstream.io/chat/flutter/tutorial/"><img src="https://i.imgur.com/L4Mj8S2.png" alt="Flutter Chat" width="60%" /></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
> The official Chat Persistence Client for Stream Chat, a service for
|
> The official Chat Persistence Client for Stream Chat, a service for
|
||||||
> building chat applications.
|
> building chat applications.
|
||||||
|
|
||||||
[](https://pub.dartlang.org/packages/stream_chat_persistence)
|
[](https://pub.dartlang.org/packages/stream_chat_persistence)
|
||||||

|

|
||||||
[](https://gitter.im/GetStream/stream-chat-flutter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
[](https://gitter.im/GetStream/stream-chat-flutter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||||

|

|
||||||
<img align="right" src="https://getstream.imgix.net/images/ios-chat-tutorial/iphone_chat_art@1x.png?auto=format,enhance" width="50%" />
|
|
||||||
|
|
||||||
|
**Quick Links**
|
||||||
|
|
||||||
|
- [Register](https://getstream.io/chat/trial/) to get an API key for Stream Chat
|
||||||
|
- [Flutter Chat Tutorial](https://getstream.io/chat/flutter/tutorial/)
|
||||||
|
- [Chat UI Kit](https://getstream.io/chat/ui-kit/)
|
||||||
|
|
||||||
This package provides a persistence client for fetching and saving chat data locally.
|
This package provides a persistence client for fetching and saving chat data locally.
|
||||||
Stream Chat Persistence uses [Moor](https://github.com/simolus3/moor) as a disk cache.
|
Stream Chat Persistence uses [Moor](https://github.com/simolus3/moor) as a disk cache.
|
||||||
|
|
||||||
|
### Changelog
|
||||||
|
|
||||||
|
Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat_persistence/changelog) to see the latest changes in the package.
|
||||||
|
|
||||||
## Add dependency
|
## Add dependency
|
||||||
Add this to your package's pubspec.yaml file, use the latest version [](https://pub.dartlang.org/packages/stream_chat_persistence)
|
Add this to your package's pubspec.yaml file, use the latest version [](https://pub.dartlang.org/packages/stream_chat_persistence)
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user