Skip to main content

All Questions

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

should i be using any state management for api calls in flutter?

What is the point of using state management like provider or getx for apis ? I mean why is the use of using any state management while it can be simply done with future or stream builder. Why do i ...
Dharwad City's user avatar
0 votes
1 answer
485 views

SOLVED - How to add a condition when the http response of given URL is err -1 or 7 in Flutter (getting an error getting images)

I'm creating a flutter news app, using this API https://newsapi.org/docs/endpoints/top-headlines Everything runs well when I select the 'us' country to fetch the news, but, when I switch to 've' (...
Mario Vicuña's user avatar
0 votes
2 answers
688 views

Flutter http.get() giving null as data,

I am newbie in coding & started by learning flutter, so i am struggling to execute the this in dart,somebody please explain i want return email id in widget,but when i print the output its giving ...
Cyber cadence's user avatar
3 votes
1 answer
1k views

FLutter || getting 500 internal error in put request but works perfectly on postman

I am working on a checkbox where when the user clicks on the checkbox it will send a put request to the server and the checkbox permanently changes to bluetick. It is working on the postman, not in my ...
ᴅ ᴇ ʙ ᴊ ᴇᴇ ᴛ's user avatar
2 votes
0 answers
1k views

Unhandled Exception: Bad state: Response has no Location header for redirect | Flutter

I'am doing a http get request but i getting this error Unhandled Exception: Bad state: Response has no Location header for redirect. This is my code. Future checkForUpdates() async { var url = &...
MURALI KRISHNAN MT's user avatar
0 votes
1 answer
142 views

status: 400, message: There is some trouble to proceed your action!, data: null

want upload image from gallery or camera to api here is my image api Future profileImageUser(String user_id, String image) async { String url = 'api'; final response = await http.post(...
Rashid Ali's user avatar
-3 votes
1 answer
1k views

Data is not get loading from API in flutter. How can I fix it?

I am calling API data and want to show it without using listview.builder in flutter but the error I am facing is that the data is not get loading and the loading indicator is active all the time. For ...
Haseeb Ahmad's user avatar
0 votes
0 answers
47 views

How pass JsonArray in flutter post request?

I Have request like {"criteriaList": [{"key":"UserId","value":238,"match":"ExactMatch"},{"key":"TenantOid","...
Pallavi Tapkir's user avatar
3 votes
1 answer
3k views

Flutter Dart Hashing in Proper Way to Authorization (SHA1, SHA256, Base64 format) (php to dart)

I am trying to integrate my flutter app with a payment api (called iyzico). Following the steps with http plugin and cyrpto plugin doesn't produce the desired solution. I wanted to ask you where is my ...
Muhtar's user avatar
  • 1,720
4 votes
2 answers
3k views

How to set base url to flutter http package?

I tried using http package of flutter and create a custom client with headers. Code class ApiClient extends http.BaseClient { final http.Client _inner; ApiClient(this._inner); _setHeaders() =...
Andreas Hunter's user avatar
-1 votes
2 answers
2k views

setState() callback argument returned a Future

I am new in flutter and stuck with this issue. Any one help me setState() callback argument returned a Future. The setState() method on _SingupPageState#7bfa9 was called with a closure or method that ...
imran's user avatar
  • 59
0 votes
1 answer
78 views

How to allow Flutter to get a value that it stored in a firebase server or any server?

Right now I am using an http 0.11.3+16 and I am able to add a true value to an item on the site using the following function: if (newAcceptStatus) { response = await http.put('https://example....
Darwish Al-Neyadi's user avatar