Skip to content

Commit bc7aef2

Browse files
committed
update changelog + cleanup comments
1 parent 6e448c7 commit bc7aef2

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

example/lib/main.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ void main() {
1212
const _key = String.fromEnvironment('key');
1313
const _userToken = String.fromEnvironment('user_token');
1414

15-
final client = StreamFeedClient(
16-
_key,
17-
// token: const Token(_userToken),
18-
);
15+
final client = StreamFeedClient(_key);
1916

2017
runApp(
2118
MyApp(

packages/stream_feed/CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
## 0.5.0: 12/01/2022
2+
3+
- BREAKING: we no longer accept a token in the constructor. This change is inspired by Stream Chat, and allows for use cases like multi account management. It allows to instantiate `StreamFeedClient` at the top of your widget tree for example, and connecting the user later.
4+
5+
```diff
6+
- client = StreamFeedClient(apiKey, token: frontendToken);
7+
+ client = StreamFeedClient(apiKey);
8+
+
9+
+ await client.setUser(
10+
+ const User(
11+
+ data: {
12+
+ 'name': 'John Doe',
13+
+ 'occupation': 'Software Engineer',
14+
+ 'gender': 'male'
15+
+ },
16+
+ ),
17+
+ frontendToken,
18+
+ );
19+
```
20+
121
## 0.4.0+3: 27/12/2021
222

323
- fix: call profile in setUser, so that currentUser data is not null

packages/stream_feed/example/main.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ Future<void> main() async {
8686
// Client-side
8787
client = StreamFeedClient(
8888
apiKey,
89-
// token: userToken,
9089
appId: appId,
9190
);
9291

@@ -339,7 +338,7 @@ Future<void> main() async {
339338
object: cheeseBurgerRef,
340339
));
341340

342-
client = StreamFeedClient(apiKey); //token: frontendToken TODO: setUser
341+
client = StreamFeedClient(apiKey);
343342
// ensure the user data is stored on Stream
344343
await client.setUser(
345344
const User(

0 commit comments

Comments
 (0)