create static method

Future<Poll> create(
  1. PollCreateParams params,
  2. {Chat? chat}
)

Builds Poll instance with given params instance.

Implementation

static Future<Poll> create(
  PollCreateParams params, {
  Chat? chat,
}) async {
  sbLog.i(StackTrace.current, 'params.title: ${params.title}');
  chat ??= SendbirdChat().chat;

  return await chat.apiClient.send(PollCreateRequest(chat, params: params));
}