Create object python which is used to call python definition and variables. print(await python[“g1”]); This will get the variable value from the python and use it in a flutter . In this way, you can call a function in flutter and save it to a variable or object, and later you can use it for further purpose.