248 questions
1
vote
2
answers
123
views
Fetch data from internet with flutter but failed to show data
I tried following the flutter doc from
text
but failed to show the data,
I suspect the problem is in the futureBuilder, haven't implement try-catch yet as I'm not sure what to call. Also when I use ...
0
votes
0
answers
47
views
Issue with iOS Flutter App where API sometimes showing DioExpception in iOS
I am working on a project where once user fills the Address field, there is drop down showing list of addresses and once user selects the address, the Postal code is extracted from the address and is ...
1
vote
0
answers
106
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:...
0
votes
2
answers
91
views
Dialog not showing data
I am trying to get data from an API, which I did successfully, and show the data in a dialog box on my Flutter App.
Initially what I did was create a function void _showDialog() right after the ...
1
vote
2
answers
636
views
NGINX reverse proxy returns HTTP 400 with a invalid header line for my flutter app.Works fine in Postman
I've setup Nginx with reverse proxy to my django backend api. The requests from Postman work perfectly fine but on Flutter I get a HTTP 400 157 from the nginx server while performing a GET request.
...
1
vote
0
answers
105
views
flutter http post in ios not receiveing any response
I am working on my first app and I was working on Android I made all configurations for Android and all HTTP requests to the backend works fine and I uploaded to the backend on the server called ...
0
votes
1
answer
200
views
flutter http.post causes the web client to crash
When I attempt a basic http post, I can see that the server is returning a normal 400. But the client seems to just crash with an error I can't make sense of. I have the following code
static Future&...
1
vote
0
answers
392
views
Flutter how to abort prevent request with http package
I have a text field to search for cities.
When I type a character, a request is sent to the server (API). When I enter any character.
I need to cancel the previous request that is pending.
Please help ...
0
votes
1
answer
59
views
dart/flutter jsonDecode on HTTP Request with null exceptions
I'm making HTTP Requests in Flutter with following code to find the nearest city by lat/lng:
import 'package:http/http.dart' as HTTP;
import 'dart:convert';
import 'dart:developer';
import 'package:...
0
votes
0
answers
124
views
flutter http.get request does not work anymore
until some days ago everything was working fine. I am not able to remember any changes in the code or in the model.
In a flutter app I do not have any response from a http.get request and I just see &...
0
votes
2
answers
785
views
ClientException: XMLHttpRequest error., uri=http://localhost:3000/api/users/allUsers
When Try to work with the api in the Desktop Simulator it is working well but with Edge/Chrome It does not work;
class UserDao { static const baseUrl = "http://localhost:3000/api";
//Get ...
1
vote
2
answers
598
views
Flutter web app encounters error when sending GET request with body
I'm currently developing a Flutter web application where I've encountered an issue specifically when attempting to send a GET request with a body. The application works as expected on Chrome, but ...
0
votes
1
answer
405
views
Increase the idle time after connection is established in Flutter
If a connection is established, it will be closed after 15 seconds (if I am wrong please let me know the connection closing time), and the idle time cannot be extended. In my situation, multiple ...
1
vote
0
answers
92
views
Flutter 308 Redirecting.... response
this is the flutter code for http post request. this endpoint send a email verification link to the entered email. now instead of 200 ok im getting this -
I/flutter (13736): Response status: 308
I/...
0
votes
1
answer
267
views
HTTP package native request queue
I am developing an application with Flutter and I am using an HTTP packet for HTTP requests. I have this problem related to Wi-Fi connection. When a user clicks a button (such as a confirm button) ...
0
votes
1
answer
5k
views
Try correcting the name to the name of an existing getter, or defining a getter or field named 'completer7'
I am trying to use the below library:
https://pub.dev/packages/http
called http
when I am trying to run the code on web, I found the below error:
Compiler message:
Launching lib\main.dart on Chrome in ...
0
votes
0
answers
251
views
How to make sure the StreamedResponse chunk is a whole string
My server emits a Server-side Event of json data. Now during the 'loading' period, the payload is short, but when the stream is completed I get a Format exception because the payload exceeds the ...
1
vote
1
answer
135
views
Flutter http request get null
I'm new to flutter and dart. While learning about get on http request I encounter some error. These are my code
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http....
-1
votes
1
answer
452
views
Error fetching data by GetX. Error on model define or else
I need to fetch Category Data from my custom made API. I create a model, controller for fetch data from API with help of getx, but it give me error. I don't know what is the problem. Can anybody help ...
1
vote
2
answers
663
views
How to handle navigation while an HTTP request is made in Flutter?
In my Flutter App, there are 2 screens called "home screen" and "data screen". In data screen I am making a GET Http request to a server and after if request is successful, I need ...
0
votes
2
answers
80
views
flutter Restful API Call Error: Expected a value 'Map<String,dynamic>',but got one of type 'String'
I am newbie of flutter
I want to load some data from my restful API by using Yii2
Provide data to API: { "account":"B0929036", "password":"12344567" } ........(...
1
vote
0
answers
343
views
Flutter http: No route to host when trying to send a request to localhost:5000
I am trying to use a Flutter app running on a device (and debugging via Android Studio) to make a simple GET request to my localhost:5000. The response should be the result of a stored procedure being ...
-1
votes
2
answers
588
views
Socket / Http is working in Java Android but not in Dart / Flutter
I am using a Ntrip client wrote in Java that is making requests using Socket.
This works fine with this code :
public void run() {
Log.d(TAG, "Run network client with server " + ...
0
votes
1
answer
67
views
How to validate date and time on the client side like Chrome does, using Flutter Web
I have a Flutter Web application, and I want to validate the date and time of the Client side, just like Chrome or Whatsapp does. To do this, I decided to send in each request the current date and ...
2
votes
0
answers
1k
views
Flutter - how to download excel file from a post http response
I'm new to flutter programming and i need to be able to download an excel file from http post request. I have two issues:
The response in flutter is null whereas in postman it displays something. The ...
0
votes
2
answers
71
views
Flutter Login type 'int' is not a subtype of type 'String'
This is my file user_model.dart
class UserModel {
int id, nik;
String password, token;
UserModel(
{required this.id,
required this.nik,
required this.password,
required ...
0
votes
1
answer
443
views
Error: type 'List<dynamic>' is not a subtype of type 'String' in Flutter
I'm learning to fetch a data from an API using mockapi.
I followed the flutter examples using the HTTP package but there's something wrong with the code and I can't seem to figure it out.
I have tried ...
0
votes
1
answer
167
views
Problem receiving information / Exception has occurred TypeError
I want to read my information from the API. But facing this error.
This is the code I wrote:
import '../models/LocationListApi.dart';
import 'package:http/http.dart' as http;
import 'dart:convert' as ...
0
votes
3
answers
141
views
fetching data from api and pass it to next page but showing error
//sign() fnction is in statless widget
var y
y=signIn();
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => posting(y),
...
1
vote
1
answer
2k
views
Connection reset by peer - Flutter http package
Infrequently I get Connection reset by peer error. As a result the the application continues to see circular progress bar and remains stuck there.
I am using http package "http: ^0.13.5".
Is ...
0
votes
1
answer
226
views
Http package refused connection on mobile network many time but on wifi works fine after updating http package
My whole team face this problem in our retailer app API works slowly on mobile network but on Wi-Fi works superb. It is not API problem http package have some kind of issue. please help to rectify ...
11
votes
4
answers
22k
views
Which is the best way of api call in flutter
I'm new in flutter development. Recently I heard about Dio and Http packages for api calling. Which is the best one for api calling. If anyone have a better way of api service??
...
0
votes
2
answers
330
views
Why can I use print my API response on a button press but not display it as a widget in Flutter? And how do I fix it?
In my Flutter App, I am trying to call an API in initState and I am able to successfully get a response in the format that I want. I know this because when I try and print the variable on a button ...
0
votes
0
answers
202
views
Connection closed error and error handling in Flutter
I get an unhandled exception error at times, and at other times, it works just fine. Not sure what is causing this issue. What I understand from my limited understanding is that it sends a async ...
0
votes
1
answer
705
views
How to pass cookie in http request - Flutter
What I'm trying do is access the Instagram private api which requires user to be logged in before sending request to it, so to achieve that, I accessed the cookies or session id with the help of ...
2
votes
1
answer
101
views
Can't Catching two awaits in dart/fluttter http module
Please help I have been searching for hours and found no solution.
I want to get data from two APIs so I call the two methods that return future and then await for their return value so that I don't ...
1
vote
1
answer
2k
views
How to deal with HTTP connection timed out crashes in Flutter
So I have a method that uses the Flutter HTTP library and is responsible for calling HTTP requests to the server with code like this:
Future<List<DataModel>> fetchData() async {
try {
...
1
vote
0
answers
99
views
can't connect django rest api with flutter and it always show connect refused
async{
try {
var url = Uri.parse("http://127.0.0.1:8000/todoget/");
var response = await http.get(url,);
print(response.statusCode.toString());
...
2
votes
0
answers
5k
views
What does 'Bad File descriptor' mean for Flutter ios?
I keep getting 'Bad file descriptor' errors for Flutter on iOS production builds. According to Sentry, they come from the post request I am sending to the backend.
Code of post function:
...
0
votes
1
answer
246
views
Flutter streamed response
Hi I use 'await for' for a streamedResponse. If I turn WiFi OFF, sometimes it resumes downloading after I turn it ON again, and sometimes not. What is the best way to deal deal with this? Should you ...
3
votes
0
answers
1k
views
Flutter Web: Http request is unable to send my header named 'Cookie', is there a way to fix this?
I am calling my API which require a header named 'Cookie' for user auth. I'm using the Http package to make the call and everything is working fine in my Android and iOS app. Now I'm testing my app on ...
6
votes
1
answer
2k
views
In Android 12+, the REST API calls are very slow in flutter, In WiFi that takes 10 seconds whereas in mobile data it is less than a second
I am facing an issue with Flutter Android 12+ version. App-consuming REST API calls using the Flutter http plugin (Version: 0.13.5). All API calls are HTTPS service calls with the domain name. API ...
0
votes
0
answers
687
views
Flutter how do you return value or error from stream
I want to use this method, but instead of returning Future<void>, I want to return a value from it. This value is either a final list of bytes or an error (if error happens anytime).
I don't ...
0
votes
1
answer
60
views
Can't get the futurebuilder data into the dropdownbutton to pick from there
I am trying to get some String data from a server via future builder, which works. Then transfer those strings into the dropdownbutton thing, to show as options then to be picked. I mean they will ...
0
votes
1
answer
51
views
Why do I get 'data2' has not been initiliazed error here?
It makes no sense at this code. I am trying to grab some strings from the ALREADY INITIALIZED from the futurebuilder data, but can't do so. It gives me the data2 has not been initialized error. Here ...
0
votes
1
answer
830
views
Flutter use api and webhook
i wanna work with this api in my flutter app
https://dev.chargily.com/docs/epay-api/
i have done the first part 1.Make Payment
but the second part 2. Payment confirmation i don't know how to do it ...
0
votes
0
answers
309
views
Flutter stream onDone
How can I return a value from a download function that looks something like this:
Either<sucess, failure> download() {
Http.streamedResponse response;
response.stream.listen((chunk) {
...
1
vote
0
answers
719
views
Flutter http request works on Android but not Chrome or MacOS
This is the code that I am running:
var response = await http.get(
Uri.parse(
'https://arkiteki.co/api/v1/questions',
),
);
Results:
Android: Works
Chrome: Error: ...
7
votes
1
answer
994
views
Why am I getting a ChromeProxyService error with Flutter Web and Chrome
I'm using Flutter version 3.3.8 and Google Chrome version 107.0.5304.110.
I send an http request, and this is the error that I get:
ChromeProxyService: Failed to evaluate expression 'xhr': ...
0
votes
1
answer
845
views
Calling Microsoft graph api through flutter app return 401
I am calling the graph api with the token returned from the app to create a user in the tenant. This api totally works fine when calling through postman but not when calling through the mobile app ...