How to send websocket data from flutter app to app or app to server

I was able to connect a channel from my app to server. I was able to send data from server to. but I am not being able to send data from app to server? How can I do this?

I am connecting to server from app like this

     't': 1,
            'd': { 'topic': 'chat'},
            
        }

Anyone can help please? Thank you.