3

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?

2 Answers 2

1

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 [email protected] -- the latest V2 version and,

On the client side for flutter we used [email protected] 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

Sign up to request clarification or add additional context in comments.

Comments

1

I use "socket.io": "^2.4.1" for server and socket_io_client: ^1.0.2 for client. It works perfectly fine for now.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.