addPollOption method

Future<Poll> addPollOption(
  1. {required int pollId,
  2. required String optionText}
)

Adds an option with optionText to this poll.

Implementation

Future<Poll> addPollOption({
  required int pollId,
  required String optionText,
}) async {
  sbLog.i(StackTrace.current, 'pollId: $pollId, optionText: $optionText');

  return await chat.apiClient.send(
    PollOptionAddRequest(
      chat,
      pollId: pollId,
      text: optionText,
      channelUrl: channelUrl,
      channelType: channelType,
    ),
  );
}