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.