createChannel static method

Future<OpenChannel> createChannel(
  1. OpenChannelCreateParams params,
  2. {ProgressHandler? progressHandler,
  3. Chat? chat}
)

Creates new OpenChannel with OpenChannelParams.

Implementation

static Future<OpenChannel> createChannel(
  OpenChannelCreateParams params, {
  ProgressHandler? progressHandler,
  Chat? chat,
}) async {
  sbLog.i(StackTrace.current,
      'params.operatorUserIds: ${params.operatorUserIds}');
  chat ??= SendbirdChat().chat;

  return await chat.apiClient.send<OpenChannel>(OpenChannelCreateRequest(
      chat, params,
      progressHandler: progressHandler));
}