get static method

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

Retrieves latest poll matching PollRetrievalParams.pollId instance from server.

Implementation

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

  return await chat.apiClient.send(PollGetRequest(
    chat,
    channelUrl: params.channelUrl,
    pollId: params.pollId,
    channelType: params.channelType,
  ));
}