[llc] update changelog and readme
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
## 0.1.0-beta
|
||||||
|
|
||||||
|
- 🛑 **BREAKING** Renamed `Client` to less generic `StreamChatClient`
|
||||||
|
- 🛑 **BREAKING** Segregated the persistence layer into separate package (stream_chat_persistence)[https://pub.dev/packages/stream_chat_persistence]
|
||||||
|
- 🛑 **BREAKING** Moved `Client.backgroundKeepAlive` to (core package)[https://pub.dev/packages/stream_chat_core]
|
||||||
|
- 🛑 **BREAKING** Moved `Client.showLocalNotification` to (core package)[https://pub.dev/packages/stream_chat_core] and renamed it to `StreamChatCore.onBackgroundEventReceived`
|
||||||
|
- Removed `flutter` dependency. This is now a pure Dart package 🥳
|
||||||
|
- Minor improvements and bugfixes
|
||||||
|
|
||||||
## 0.2.24+2
|
## 0.2.24+2
|
||||||
|
|
||||||
- Fix reconnection bug while using tokenProvider
|
- Fix reconnection bug while using tokenProvider
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ You can sign up for a Stream account at https://getstream.io/chat/
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
dependencies:
|
dependencies:
|
||||||
stream_chat: ^0.2.0
|
stream_chat: ^1.0.0-beta
|
||||||
```
|
```
|
||||||
|
|
||||||
You should then run `flutter packages get`
|
You should then run `flutter packages get`
|
||||||
@@ -57,27 +57,34 @@ final client = Client("stream-chat-api-key", logHandlerFunction: myLogHandlerFun
|
|||||||
|
|
||||||
### 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 {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
## Flutter Web
|
final client = Client(
|
||||||
|
apiKey ?? kDefaultStreamApiKey,
|
||||||
Due to Moor web (for offline storage) you need to include the sql.js library:
|
logLevel: Level.INFO,
|
||||||
|
)..chatPersistenceClient = CustomChatPersistentClient();
|
||||||
```html
|
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<script defer src="sql-wasm.js"></script>
|
|
||||||
<script defer src="main.dart.js" type="application/javascript"></script>
|
|
||||||
</head>
|
|
||||||
<body></body>
|
|
||||||
</html>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You can grab the latest version of sql-wasm.js and sql-wasm.wasm [here](https://github.com/sql-js/sql.js/releases) and copy them into your `/web` folder.
|
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 = Client(
|
||||||
|
apiKey ?? kDefaultStreamApiKey,
|
||||||
|
logLevel: Level.INFO,
|
||||||
|
)..chatPersistenceClient = chatPersistentClient;
|
||||||
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,24 @@ final chatPersistentClient = StreamChatPersistenceClient(
|
|||||||
|
|
||||||
And you are ready to go...
|
And you are ready to go...
|
||||||
|
|
||||||
|
## Flutter Web
|
||||||
|
|
||||||
|
Due to Moor web (for offline storage) you need to include the sql.js library:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<script defer src="sql-wasm.js"></script>
|
||||||
|
<script defer src="main.dart.js" type="application/javascript"></script>
|
||||||
|
</head>
|
||||||
|
<body></body>
|
||||||
|
</html>
|
||||||
|
```
|
||||||
|
|
||||||
|
You can grab the latest version of sql-wasm.js and sql-wasm.wasm [here](https://github.com/sql-js/sql.js/releases) and copy them into your `/web` folder.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
We welcome code changes that improve this library or fix a problem,
|
We welcome code changes that improve this library or fix a problem,
|
||||||
|
|||||||
Reference in New Issue
Block a user