sentTo method
Emits an event with optional data to the socket.
event is the name of the event to emit.
data is the optional payload to send with the event.
Implementation
void sentTo({required String event, dynamic data}) {
_socket.emit(event, data);
}