Skip to content

Commit 7347f6d

Browse files
committed
update READMEs
1 parent bc7aef2 commit 7347f6d

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

packages/stream_feed/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ final userToken = client.frontendToken('the-user-id');
6666
#### Client API init
6767

6868
```dart
69-
// Instantiate new client with a user token
70-
var client = StreamFeedClient(apiKey, token: Token('userToken'));
69+
// Instantiate new client and set the user token
70+
var client = StreamFeedClient(apiKey);
71+
72+
await client.setUser(user:user, token: frontendToken);
7173
```
7274

7375
### 🔮 Examples

packages/stream_feed_flutter_core/README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,20 @@ import 'package:stream_feed_flutter_core/stream_feed_flutter_core.dart';
4545
void main() {
4646
const apiKey = 'API-KEY';
4747
const userToken = 'USER-TOKEN';
48-
final client = StreamFeedClient(
49-
apiKey,
50-
token: const Token(userToken),
48+
final client = StreamFeedClient(apiKey);
49+
50+
await client.setUser(
51+
const User(
52+
id: 'GroovinChip',
53+
data: {
54+
'handle': '@GroovinChip',
55+
'first_name': 'Reuben',
56+
'last_name': 'Turner',
57+
'full_name': 'Reuben Turner',
58+
'profile_image': 'https://avatars.githubusercontent.com/u/4250470?v=4',
59+
},
60+
),
61+
const Token(userToken),
5162
);
5263
5364
runApp(

0 commit comments

Comments
 (0)