setVotes static method
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));
}