Maybe Flutter works as a client to a native localhost app? (Analogous to the browser for a localhost web app like Jupyter Notebook[1].)
Does it have a Websocket client?
Does it have a Websocket client?
Just that once you do that you're no longer a portable cross-platform app, and there's limits to what you can do with that pipe in terms of data marshaling and the overhead from that.