get static method

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

Fetches latest PollOption representation from the server.

Implementation

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

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