[llc] update changelog and readme

This commit is contained in:
Salvatore Giordano
2021-02-01 15:13:59 +01:00
parent fe45b2ef6e
commit 4e6d64064e
3 changed files with 52 additions and 18 deletions
+9
View File
@@ -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
- Fix reconnection bug while using tokenProvider
+25 -18
View File
@@ -14,7 +14,7 @@ You can sign up for a Stream account at https://getstream.io/chat/
```yaml
dependencies:
stream_chat: ^0.2.0
stream_chat: ^1.0.0-beta
```
You should then run `flutter packages get`
@@ -57,27 +57,34 @@ final client = Client("stream-chat-api-key", logHandlerFunction: myLogHandlerFun
### 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
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>
final client = Client(
apiKey ?? kDefaultStreamApiKey,
logLevel: Level.INFO,
)..chatPersistenceClient = CustomChatPersistentClient();
```
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
@@ -44,6 +44,24 @@ final chatPersistentClient = StreamChatPersistenceClient(
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
We welcome code changes that improve this library or fix a problem,