Skip to content

Instantly share code, notes, and snippets.

@pinkeshdarji
Created June 25, 2021 07:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pinkeshdarji/7e3a813d8f67cc48846eb93af7318ea5 to your computer and use it in GitHub Desktop.
Save pinkeshdarji/7e3a813d8f67cc48846eb93af7318ea5 to your computer and use it in GitHub Desktop.
Future<void> main() async {
WidgetsFlutterBinding.
();
final client = StreamChatClient(
'ue75xxvdjwwa',
logLevel: Level.
,
);
await AppE2EE().generateKeys();
Map<String, dynamic> publicKeyJwk =
await AppE2EE().keyPair.publicKey.exportJsonWebKey();
await client.connectUser(
User(
id: 'Pinkesh',
extraData: {
'image': 'https://picsum.photos/id/1025/200/300',
'publicKey': publicKeyJwk,
},
),
client.devToken('Pinkesh'),
);
final channel = client.channel(
"messaging",
id: "guitarist",
extraData: {
"name": "Guitarist",
"image": "https://source.unsplash.com/5HltXT-6Vgw",
"members": ['Pinkesh', 'Jhon'],
},
);
await channel.watch();
runApp(MyApp(
client: client,
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment