Nodejs Socketio connection not working on Flutter Application

Viewed 70

So I am creating a chat application with server in nodejs and frontend client in Flutter. The socket connection works for JS files but dose not connect with flutter.

The socket.io version on nodejs is 4.5.1 and on flutter the socket.io-client version is 2.0.0. I believe it's the version compatibility issue. Both the versions are the latest one's available.

Can anyone help me on this problem?

1 Answers

Okay so after some searching we came to a solution. Here's the doc that helped us figure out the verion compatibility.

https://socket.io/docs/v4/client-installation/

On the server side we used socket.io@2.5.0 -- the latest V2 version and,

On the client side for flutter we used socket.io-client@0.9.12 as available in the pub.dev packages.

You can also check the socket.io-client version compatibility for flutter from here https://pub.dev/packages/socket_io_client

Related