I'm a scientist with a lot of python background, and I enjoy developping UI for little projects I develop, for fun. I have already built an android app with kivy, and I'm now studying dart and flutter. I find building the UI with flutter much easier than with kivy, but all the logic I had built for the app was in python, and it uses lots of packages (for magnetism calculations).
Is there a (easy/friendly) way to reuse the python scripts for the logic and/or matplotlib for outputting plots using flutter to design the UI?
Thanks in advance.
As answered you can use Flask as a local webserver and retrieve data from python application.
But, if you need better speed and also need to send multiple responses(like progress) from python application to flutter. I would prefer using WebSocket.
You can create a local WebSocket server, and connect flutter and python in a faster way.
NOTE: WebSocket are not recommended when you only need responses for specific requests.
Is there a way to easily (and officialy?) integrate python, and more specifically matplotlib, with flutter?