deletePoll method
Delete Poll
Implementation
Future<void> deletePoll({
required int pollId,
OnCompleteCallback? onCompleted,
}) async {
try {
await _sdk.api.send(PollDeleteRequest(pollId: pollId));
if (onCompleted != null) {
onCompleted(true, null);
}
} catch (e) {
if (onCompleted != null) {
onCompleted(false, SBError(message: 'Failed deleting Poll'));
}
throw SBError(message: e.toString());
}
return;
}