sendbird_sdk 3.0.10 copy "sendbird_sdk: ^3.0.10" to clipboard
sendbird_sdk: ^3.0.10 copied to clipboard

outdated

The Flutter SDK for Sendbird Chat brings modern messenger chat features to your iOS and Android deployments..

example/main.dart

import 'package:sendbird_sdk/sendbird_sdk.dart';

void main(List<String> arguments) async {
  // This example uses the Google Books API to search for books about http.
  // https://developers.google.com/books/docs/overview

  final sendbird = SendbirdSdk(appId: 'YOUR-APP-ID');

  try {
    final user = await sendbird.connect('UNIQUE-USER-ID');
    final params = GroupChannelParams()
      ..userIds = [user.userId]
      ..operatorUserIds = [user.userId]
      ..name = 'YOUR_GROUP_NAME'
      ..customType = 'CUSTOM_TYPE'
      ..isPublic = true;

    // create group channel
    final channel = await GroupChannel.createChannel(params);

    channel.sendUserMessageWithText('Hello World',
        onCompleted: (message, error) {
      // message has been sent successfully
      print('${message.message} has been sent!');
    });
  } catch (e) {
    // handle error
  }
}
37
likes
0
pub points
88%
popularity

Publisher

verified publishersendbird.com

The Flutter SDK for Sendbird Chat brings modern messenger chat features to your iOS and Android deployments..

Homepage

License

unknown (license)

Dependencies

collection, connectivity, device_info, encrypt, flutter, http, http_parser, json_annotation, logger, meta, mime, shared_preferences, uuid, yaml

More

Packages that depend on sendbird_sdk