Here are the steps you should follow:
Read moreHow do you connect a Flutter with a flask?
You can connect them by making a Flask API, deploying it on a server , and then interacting with that API from your Flutter app using any kind of request package, and this will indeed be the same code for both platforms.
Read more