I have a Flask application running on my local machine, which I'm using as a backend for the Flutter application , but I'm getting this error
SocketException (SocketException: No route to host (OS Error: No route to host, Errno = 113)
Future pix(String BackgroundImagePath, String originalImagePath) async {
final uri = Uri.parse('http://my desktop address:5000').replace(queryParameters: {
'original': originalImagePath,
'background': BackgroundImagePath,
});
final response = await http.get(uri);
- The phone is connected to my laptop through a USB
- Both phone & Laptop are on same WIFI
- I replaced
localhostwith my Ubuntu desktop IP address