pauldemarco / socketcluster_client

SocketCluster.io Client for Dart
BSD 3-Clause "New" or "Revised" License
12 stars 10 forks source link

Cannot connect on Flutter mobile #11

Closed MichaelMarner closed 5 years ago

MichaelMarner commented 5 years ago

Unable to connect to a socketcluster server using Flutter on mobile:

Unhandled Exception: NoSuchMethodError: Closure call with mismatched arguments: function 'onOpen'
Receiver: Closure: (String, {Iterable<String> protocols, Map<String, dynamic> headers, CompressionOptions compression}) => Future<WebSocket> from Function 'connect': static.
Tried calling: onOpen
Found: onOpen(String, {Iterable<String> protocols, Map<String, dynamic> headers, CompressionOptions compression}) => Future<WebSocket>
#0      Object.noSuchMethod  (dart:core-patch/object_patch.dart:51:5)
#1      new Socket._internal 
package:socketcluster_client/src/socket.dart:36
#2      Socket.connect 
package:socketcluster_client/src/socket.dart:52