I am working on an automation app for Raspberry that requires a few python scripts to work. I made the front end in flutter. Is it possible to run these python scripts through a flutter app running on Raspberry Pi when a button in that app is pressed? (for example turning a stepper motor, sending current through a GPIO pin for a few seconds) It should work offline, and I would prefer if these scripts were saved as an external .py file.
To run the app on raspberry, I was planning on using https://github.com/ardera/flutter-pi If there is a better variant to do that, please tell me so.