Adonis js websocket in flutter app

I am trying to use websocket in flutter. Not sure how it’s going on. There are a web socket package in flutter. Please read. I think you guys can help even if you don’t know flutter :smiley: .

Ok so here is the flutter package

here is the example set up

I connected it in my adonis url ws://localhost:8181/adonis-ws

I have a code like this{
            't': 1,
            'd': { 'topic': 'chat' }

and in my socket controller’s constructor method I was able to console. it shows connected successfully!

My connection code looks like this

new StreamBuilder(
              builder: (context, snapshot) {
                return new Padding(
                  padding: const EdgeInsets.all(20.0),
                  child: new Text(snapshot.hasData ? '${}' : ''),

so when connecting i get these data from adonis server

Then when send data to server like this{
            't': 1,
            'd': { 'topic': 'chat' }

I get this data back and also console.log in adonis server works. but onMessage is never called in adonis.

Now how can I send actual data to adonis server and send back data from adonis server? Any idea help would be appreciated. Thank you.


i was wondering after a recommendation to re-build my apps in flutter
how much would it take, and is it really worthy