Skip to content

Commit df9c7a5

Browse files
committed
Fix #379 could we ack when we receive a new event
1 parent deed0ca commit df9c7a5

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 3.1.2
2+
3+
**Bug fix:**
4+
* [#379](https://github.com/rikulo/socket.io-client-dart/issues/379#issuecomment-2407013081) Dynamic call with too many positional arguments. Expected: 2 Actual: 3
5+
16
## 3.1.1
27

38
**New Feature:**

lib/src/socket.dart

+5-1
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,11 @@ class Socket extends EventEmitter {
457457
if (_anyListeners.isNotEmpty) {
458458
final listeners = List.from(_anyListeners);
459459
for (final listener in listeners) {
460-
Function.apply(listener, args);
460+
if (args.length > 2) {
461+
Function.apply(listener, [args.first, args.sublist(1)]);
462+
} else {
463+
Function.apply(listener, args);
464+
}
461465
}
462466
}
463467
// Assuming `super.emit` is analogous to calling an inherited or mixin method.

pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: socket_io_client
22
description: Dartlang port of socket.io-client for web, flutter, dartvm to use
3-
version: 3.1.1
3+
version: 3.1.2
44
homepage: https://www.zkoss.org
55
repository: https://github.com/rikulo/socket.io-client-dart
66
issue_tracker: https://github.com/rikulo/socket.io-client-dart/issues
@@ -10,7 +10,7 @@ environment:
1010

1111
dependencies:
1212
logging: '^1.2.0'
13-
socket_io_common: '^3.1.0'
13+
socket_io_common: '^3.1.1'
1414
web: ^1.1.0
1515

1616
dev_dependencies:

0 commit comments

Comments
 (0)