diff --git a/lib/src/darty.dart b/lib/src/darty.dart
index df89e3e..ed7a3cc 100644
--- a/lib/src/darty.dart
+++ b/lib/src/darty.dart
@@ -7,56 +7,56 @@ import 'package:socket_io_common/src/util/event_emitter.dart';
 
 /// Default event listeners for dart way API.
 extension DartySocket on Socket {
-  void onConnect(EventHandler handler) {
-    on('connect', handler);
+  void Function() onConnect(EventHandler handler) {
+    return on('connect', handler);
   }
 
-  void onConnectError(EventHandler handler) {
-    on('connect_error', handler);
+  void Function() onConnectError(EventHandler handler) {
+    return on('connect_error', handler);
   }
 
-  void onConnectTimeout(EventHandler handler) {
-    on('connect_timeout', handler);
+  void Function() onConnectTimeout(EventHandler handler) {
+    return on('connect_timeout', handler);
   }
 
-  void onConnecting(EventHandler handler) {
-    on('connecting', handler);
+  void Function() onConnecting(EventHandler handler) {
+    return on('connecting', handler);
   }
 
-  void onDisconnect(EventHandler handler) {
-    on('disconnect', handler);
+  void Function() onDisconnect(EventHandler handler) {
+    return on('disconnect', handler);
   }
 
-  void onError(EventHandler handler) {
-    this.io.on('error', handler);
+  void Function() onError(EventHandler handler) {
+    return this.io.on('error', handler);
   }
 
-  void onReconnect(EventHandler handler) {
-    this.io.on('reconnect', handler);
+  void Function() onReconnect(EventHandler handler) {
+    return this.io.on('reconnect', handler);
   }
 
-  void onReconnectAttempt(EventHandler handler) {
-    this.io.on('reconnect_attempt', handler);
+  void Function() onReconnectAttempt(EventHandler handler) {
+    return this.io.on('reconnect_attempt', handler);
   }
 
-  void onReconnectFailed(EventHandler handler) {
-    this.io.on('reconnect_failed', handler);
+  void Function() onReconnectFailed(EventHandler handler) {
+    return this.io.on('reconnect_failed', handler);
   }
 
-  void onReconnectError(EventHandler handler) {
-    this.io.on('reconnect_error', handler);
+  void Function() onReconnectError(EventHandler handler) {
+    return this.io.on('reconnect_error', handler);
   }
 
-  void onReconnecting(EventHandler handler) {
-    on('reconnecting', handler);
+  void Function() onReconnecting(EventHandler handler) {
+    return on('reconnecting', handler);
   }
 
-  void onPing(EventHandler handler) {
-    this.io.on('ping', handler);
+  void Function() onPing(EventHandler handler) {
+    return this.io.on('ping', handler);
   }
 
-  void onPong(EventHandler handler) {
-    on('pong', handler);
+  void Function() onPong(EventHandler handler) {
+    return on('pong', handler);
   }
 }