Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
31 views

How can I properly get data from an API using http.get in Dart?

I'm new to Dart and I'm trying to get data from an API using the http package. Here's my code: import 'dart:convert'; import 'package:http/http.dart' as http; void fetchData() { try { final ...
Amaal.Psau's user avatar
2 votes
0 answers
43 views

Why am I getting a 404 status code from my PUT method, when the GET method returns 200?

The method saveToDatabase() that I use to store the list of questions to my db.json on Github, returns 404 status code from the PUT method. Whereas, the same method returns a 200 status code when ...
Sameer Ahmed's user avatar
1 vote
0 answers
35 views

Trying to deploy shelf package on flutter mobile without succes

i am trying to build a mobile application for a universty subject and i am new to both dart and flutter. I am having trouble setting up a local http server that i want to be hosted by the movile phone ...
Máx's user avatar
  • 11
0 votes
0 answers
23 views

Error reading MIME multipart body part in flutter

public async Task<CommonResponse> Registration() { CommonResponse response = new CommonResponse(); try { if (!Request.Content.IsMimeMultipartContent()) { response....
Sumit Singh's user avatar
4 votes
3 answers
52 views

Flutter app not displaying data from Node.js API (Express + HTTP request)

Problem: I am developing a Flutter app that fetches coffee data from a Node.js Express API using an HTTP request. The API works fine when tested in Postman and returns the expected JSON response. ...
Prashant Shukla's user avatar
0 votes
1 answer
94 views

Why are Dart http requests for GeminiAPI on Ubuntu VPS being blocked

I am running a simple Dart server with package shelf. The server makes a request to generativelanguage.googleapis.com. Everything is working fine on my own machine. When the Dart program is running on ...
NoctisBeta's user avatar
0 votes
0 answers
33 views

dart http.post throws but exception can't be caught

I'm using 'package:http/http.dart' as http to make http post requests. I'm testing connecting to a local web server on localhost. Future<void> startTimer( int bedId, Duration duration, ...
Brett Sutton's user avatar
  • 4,654
0 votes
0 answers
42 views

Can you open a new page from an API redirect?

I am working on a dart/flutter web app with a custom back-end. Both use dart and the front-end is supposed to make an API call against the back-end which then anwsers with a redirect to an external ...
TomSu's user avatar
  • 13
1 vote
0 answers
84 views

How to bypass server restrictions for downloading a file due to CORS policy?

I am working on a Flutter application, and I need to download a ZIP file from a public server using an HTTP GET request. The URL is something like: "https://example.com/file.zip". However, ...
Omri Developer's user avatar
1 vote
0 answers
42 views

Web scraping with Flutter

I'm trying to scrape a website using Flutter, the goal is to create an application that tracks trains from my city to Milan so I can use that instead of looking on the official apps which are awful. ...
Simone Sesana's user avatar
1 vote
0 answers
70 views

iOS cupertino_http error: Unhandled Exception: Invalid argument(s): Couldn't resolve native function '_wrapListenerBlock_1a6kixf'

I am trying to run the sample app given with cupertino_http package in iOS. But I am getting below error. flutter: The Dart VM service is listening on http://127.0.0.1:53003/tmg2xds8gus=/ [ERROR:...
Shubham Gupta's user avatar
1 vote
1 answer
45 views

Flutter blocs with API requests

I am getting response data from an api while passing in a response body. I have built my state, event, repository of my request but upon calling the user details event in my home page where I want to ...
Anne Nduati's user avatar
0 votes
1 answer
65 views

HTTP request get statusCode:400 in flutter_test, but it get status:200 in orignal dart method call

It's weird, i tried postman or browser, http get request works fine, but it aways get status: 400 in flutter. I just only debug it on web(chrome) Simulator and flutter-test. Here is my env: Flutter (...
Kyrie Cui's user avatar
0 votes
0 answers
43 views

Flutter web SSE listener

I'm encountering an issue when trying to establish a connection with an SSE (Server-Sent Events) API endpoint on Flutter Web. The code works correctly on iOS and Android platforms, but on Flutter Web, ...
JBTG's user avatar
  • 131
0 votes
0 answers
2k views

Flutter Phone Application Exception: ClientException with SocketException: Failed host lookup: 'xxxxxxx' error

I am getting an error from the API I am using in the application I made in Flutter. It works fine in the web and desktop application, but when I start the phone application, it gives an error. Error: ...
Mert's user avatar
  • 298

15 30 50 per page
1
2 3 4 5
60