handle Create Poll
Handles the creation of a poll by emitting a "createPoll" event with the provided details. Shows an alert based on the success or failure of the operation.
Example:
val options = HandleCreatePollOptions(
poll = Poll(question = "Favorite color?", type = "singleChoice", options = listOf("Red", "Blue", "Green")),
socket = socketInstance,
roomName = "roomA",
showAlert = { message -> Logger.d("HandleCreatePoll", message) },
updateIsPollModalVisible = { isVisible -> setIsPollModalVisible(isVisible) }
)
handleCreatePoll(options)Content copied to clipboard