sendbird_sdk 3.1.0-nullsafety copy "sendbird_sdk: ^3.1.0-nullsafety" to clipboard
sendbird_sdk: ^3.1.0-nullsafety 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 {
  // create sendbird sdk instance with application id
  final sendbird = SendbirdSdk(appId: 'YOUR-APP-ID');

  try {
    // connect sendbird server with user id
    final user = await sendbird.connect('UNIQUE-USER-ID');

    // generate group channel parameters
    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);

    // send user message to the group channel
    channel.sendUserMessageWithText('Hello World',
        onCompleted: (message, error) {
      // message has been sent successfully
      print('${message.message} has been sent!');
    });
  } catch (e) {
    // handle error
  }
}
copied to clipboard
38
likes
0
points
1.37k
downloads

Publisher

verified publishersendbird.com

Weekly Downloads

2024.09.19 - 2025.04.03

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

Homepage
Repository

Documentation

Documentation

License

unknown (license)

Dependencies

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

More

Packages that depend on sendbird_sdk