sendbird_chat 0.0.2
sendbird_chat: ^0.0.2 copied to clipboard
A flutter plugin for utilizing sendbird's chat platform API.
sendbird_chat #
A Flutter package for Android, iOS and web to utilize basic Sendbird API functionality to their applications.
Usage #
To use this package, add the dependency to your pubspec.yaml
file:
dependencies:
flutter:
sdk: flutter
sendbird_chat
copied to clipboard
Features #
- List, Create & Delete users
- List, Create & Delete open channels
- List, Send open channel messages
How to use #
Initialize #
SendbirdChat chat = SendbirdChat(
applicationId: '', // replace with your application id
apiToken: ''); // replace with your application API token (secondary recommended)
copied to clipboard
Creating a User #
chat.createUser(userId);
copied to clipboard
Creating an Open Channel #
chat.createOpenChannel(
name: '<name_of_channel>',
userIds: ['user_id']) // user ids of operators
copied to clipboard
Sending a Message #
chat.sendOpenChannelMessage(
channelUrl: '<open_channels_url>', // looks like sendbird_open_channel_XXXX_7c280d5d186be4ebf38a3e77b225040865eea22f
originUserId: '<user_id_of_sender>',
message: '<string_message>')
copied to clipboard
Getting Started #
For help modifying package code, view the plug-in package documentation, a specialized package that includes platform-specific implementation code for Android and/or iOS.
For help getting started with Flutter, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.