0
I’m trying to run a Flutter mobile project on WEB.
There is a part that we make a requisition http an endpoint to take a JSON data that is used the following excerpt:
final response = await http.get("http://localhost:4141/apicardapio.php?testeconexao=OK");
Mobile works correctly, but the WEB-compiled project is giving the following Exception:
message = "XMLHttpRequest error". uri = {_SimpleUri} http://localhost:4141/apicardapio.php?testeconexao=OK _fragmentStart = 56 _hashCodeCache = null _hostStart = 7 _pathStart = 24 _portStart = 19 _queryStart = 40 _schemeCache = "http" _schemeEnd = 4 _uri = "http://localhost:4141/apicardapio.php?testeconexao=OK"
Someone’s been through this trouble?