I was trying to link the flutter app with python with API. My python code generated http://127.0.0.1:5000/ URL. When I used this in flutter code it threw the error
Unhandled Exception: SocketException: OS Error: Connection refused, errno = 111, address = 127.0.0.1, port = 56782
I found a solution in this video
Why does this solution work??