I tried to call my api with flutter but when i make a request i have this error:

E/flutter (15338): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Connection refused

E/flutter (15338): #0 IOClient.send (package:http/src/io_client.dart:88:7)

E/flutter (15338): E/flutter (15338): #1 BaseClient._sendUnstreamed (package:http/src/base_client.dart:93:32)

E/flutter (15338): E/flutter (15338): #2_withClient (package:http/http.dart:164:12)

E/flutter (15338): < asynchronous suspension>

Have you ever seen this error? And I'm use xampp as an server.

And the api files are php with mysql files...that API is correct but i have this type of connection refused.what is the solution?