deletePollOption method
Future<void>
deletePollOption({
- required int pollId,
- required int pollOptionId,
- OnCompleteCallback? onCompleted,
Delete Poll Option
Implementation
Future<void> deletePollOption({
required int pollId,
required int pollOptionId,
OnCompleteCallback? onCompleted,
}) async {
try {
await _sdk.api.send(PollOptionDeleteRequest(
pollId: pollId,
pollOptionId: pollOptionId,
));
if (onCompleted != null) {
onCompleted(true, null);
}
} catch (e) {
if (onCompleted != null) {
onCompleted(false, SBError(message: 'Failed deleting poll opiton.'));
}
}
}