setVotes static method

Future setVotes(
  1. Set<String> pollOptionIds,
  2. String activityId
)

Set votes to an activity with poll.

pollOptionId Poll option id to vote for. activityId To add the vote to.

Implementation

static Future setVotes(Set<String> pollOptionIds, String activityId) {
  Map<String, dynamic> addVotesBody = {
    'pollOptionIds': pollOptionIds.toList(),
    'activityId': activityId
  };
  return NativeBridge.async('Communities.setVotes', jsonEncode(addVotesBody));
}