Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Flutter – Invalid argument(s): No host specified in URI "ws:localhost:3000"

I will try connect Websocket with flutter

   final _channel = WebSocketChannel.connect(
    Uri.parse('ws:localhost:3000'),
  );

It working with web platfrom but i run it in ios or masOs destop,… it return Error:

Invalid argument(s): No host specified in URI http://:0/localhost:3000

Error in ios device

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Please help me!
Thanks for any support

>Solution :

Not sure but you can try

Uri.parse('ws://localhost:3000')

//Or

Uri.parse('wss://localhost:3000')

//Or

Uri.parse('wss:localhost:3000')

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading