Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
2 answers
371 views

About Fetching and Updating data from Node.js rest API in Flutter

I am developing a Flutter app. Upon login I store the User ID in shared preferences. Now I want to show the User Profile in the Navigation Drawer. The User Profile consists of: student's name, class, ...
MIHIR's user avatar
  • 53
0 votes
1 answer
311 views

Why result of rest api mapping is null?

Here is my controller code, why is data returning as a null value? Future<List<GetEntityKindsModel>> getEntityKinds() async { List<GetEntityKindsModel> data = []; try { ...
Linisha's user avatar
  • 17
0 votes
1 answer
82 views

Can't able fetch data form json using class in flutter(dart)

I am trying to retrieve the temperature data from a weather API using a generated class in Dart, created with the JSON to Dart Extension. I have been able to retrieve the entire JSON response from the ...
faiz's user avatar
  • 13
0 votes
1 answer
137 views

Flutter rest api mapping query

` Future<List<GetEntityKindModel>> getGroups() async { List<GetEntityKindModel> data = []; try { var response = await http.get(Uri.parse(url)); ...
Linisha's user avatar
  • 17
-1 votes
1 answer
228 views

Unhandled exception: Connection timed out | Flutter | REST API

I have built a REST API using Flask framework in Python and it works completely fine when tested via Postman. But when I make requests using an android emulator, I get an exception displaying "...
Ozone317's user avatar
1 vote
0 answers
214 views

how to post multiple data to rest api

when ever I try to post list of data at one time to rest api the api deletes the previous data and stares new one [ { "name": "6E72Ln9Y095x8n80Xgk6\/435291346914161.jpg"...
abdifatah nour's user avatar
0 votes
1 answer
922 views

flutter does not show data from API

When I try to pull data from the jsonplaceholder API and put it on the screen, I don't have any problems, but when I try to change the data in this link (https://reqres.in/api/users?page=2 ) on the ...
MertYavuz's user avatar
0 votes
1 answer
148 views

Flutter: Do sort and filter feature in Flutter or the back end?

I am working on the sort and filter feature on my ecommerce application. Things like sort by price low to high, filter by brand name and colour. Where is the best practice to do this feature? Should I ...
typicalCSStudent's user avatar
0 votes
1 answer
80 views

i am using django as a backend to flutter

when i get data from API Arabix words doesn't show and it show like this is this from flutter or Django Restframework? flutter request ''' final url = Uri.parse('http://127.0.0.1:8000'); final data ...
mohamed hawas's user avatar
1 vote
3 answers
2k views

Flutter cant get a response from API

im quite new in flutter and i wanted to build a Reciep app with Edamam Api, but when i tried to print a response, i didnt get any response and showing nothing in my debug console. i didnt know what ...
NyK's user avatar
  • 113
1 vote
2 answers
1k views

Flutter API keep loading and not showing

So i tried to create a listview of a news with this API https://newsapi.org/s/us-news-api but when i tried to implement it in my App it keeps loading and never show the data. here is my homepage code ...
NyK's user avatar
  • 113
1 vote
1 answer
3k views

"The body might complete normally, causing 'null' to be returned, but the return type, 'FutureOr<List<Article>>', is a potentially non-nullable type."

I was trying to make a News App with newsapi.org, but got this error: The body might complete normally, causing 'null' to be returned, but the return type, 'FutureOr<List<Article>>', is a ...
NyK's user avatar
  • 113
-1 votes
1 answer
379 views

How to implement all types of APIs request in Flutter GetX

I want to implement all the type of HTTP request in a API using Flutter GetX state management. I have managed to do the "get" request. I want to implement all the type of HTTP request in a ...
Abhijeet Vishwakarma's user avatar
1 vote
1 answer
948 views

How to pass this 'Dio Post Request' Problem in Flutter

I have to send an object from the request. Although it works on Swagger, I cannot send it from my flutter code. When I was trying it, it always gave me Http status error 400 This problem is coming my ...
Frontends Union's user avatar
0 votes
1 answer
1k views

How to read data from Api using getx Obx

lateinitialization error shows on the first loading of screen.datas are only getting after i hot reload my app.please help me to solve this issue. It is an api to get details of a single actor. I want ...
Nishan Rasheed's user avatar
0 votes
1 answer
1k views

Flutter http 400 error when sending an XFile Image

I want to send a jpg file from my flutter app to .Net backend. I'm using http package. My code is as follows: var uri = Uri.parse('$url/upload/$id'); var request = http.MultipartRequest('POST', uri); ...
MartinYakuza's user avatar
0 votes
2 answers
74 views

Flutter: 'Null' is not a subtype of type 'String', when calling rest api

I would be highly grateful if the answer is in simple terms. I am a beginner. here is my full project code: https://drive.google.com/file/d/1nj7Pj7Gzl-xVzzCm-aPRu2H1QUvdjoZB/view?usp=sharing My error ...
Saad Mansoor's user avatar
0 votes
1 answer
248 views

Unable to do a POST request to my API using flutter and http client

I was building a Todo application in Flutter, with a custom API that I built using Node.js, planetscale(MySQL), and Prisma. The API is complete. Now I was implementing the frontend, but for some ...
GN Vageesh's user avatar
1 vote
2 answers
3k views

How to make a http post using form data in flutter

I'm trying to do a http post request and I need to specify the body as form-data, because the server don't take the request as raw or params. here is the code I tried ** Future getApiResponse(url) ...
Pluto WEB's user avatar
0 votes
1 answer
28 views

Flutter list is not rebuilt and the new item has not appeared

hi i m using the rest API to bring data from the data base and when i make a change in the data base i want it so if i Go to the other screen and Pop to the previous screen i want the get request ...
Aziz Lachkar's user avatar
-1 votes
1 answer
427 views

Rest API data stored in locally - Flutter

I have a requirement to store data locally to use within a Flutter mobile application. This stored data will be used for when the device is offline and will need to be updated, whilst offline. On ...
Dean Ball's user avatar
-1 votes
1 answer
254 views

Flutter Call REST API WITHOUT AUTH ALWAYS RETURN 401

I am new to flutter and currently doing some testing on flutter sample code (Form App). I am trying to change the URI to my existing login REST API (which tested with postman and working fine). But it'...
user3607582's user avatar
0 votes
1 answer
1k views

REST API request Flutter web CORS issue

I hope you are well I have a problem with flutter web. I try to make an API REST request to https://timeapi.io/api/TimeZone/zone?timeZone=Europe/Amsterdam to get the time from a specific location but ...
Steeven Delucis's user avatar
0 votes
2 answers
257 views

Store Image in List<Xfile> from image urls

I have created a variable List<Xfile> imageList; using this variable I have showed the selected images in GridView.Builder and uploaded them. But I want to store those uploaded images in this ...
Alok's user avatar
  • 1
0 votes
1 answer
55 views

Api type 'List<dynamic>' is not a subtype of type 'Map<String, dynamic>'

I'm following flutter's documentation for a api integration but I'm getting this error type 'List<dynamic>' is not a subtype of type 'Map<String, dynamic>' The sample response api gives ...
Ali Akbar's user avatar
  • 141
0 votes
0 answers
250 views

How to get only specific value in REST API JSON response?

I'm using REST API to get data from my Learndash courses. I need a list of ID, title, and feature images. I used .. to get the lists of IDs and titles. But when I use _embed I also get IDs from wp:...
MD Rashed Bin Kuddus's user avatar
-1 votes
2 answers
5k views

type 'String' is not a subtype of type 'Map<String, dynamic>' flutter

this is my model file: // To parse this JSON data, do // // final economylistXml = economylistXmlFromJson(jsonString); import 'dart:convert'; EconomylistXml economylistXmlFromJson(String str)...
Mıktad Tahir Durak's user avatar
1 vote
4 answers
587 views

type 'Null' is not a subtype of type 'String' flutter on api call

Im using a service to create api from xml. This is my model file: // To parse this JSON data, do // // final economylistXml = economylistXmlFromJson(jsonString); import 'dart:convert'; ...
Mıktad Tahir Durak's user avatar
0 votes
1 answer
38 views

error: The operator '[]' isn't defined for the type 'Haberler'. flutter

i converted XML to api from a service: this is my model : // To parse this JSON data, do // // final economylistXml = economylistXmlFromJson(jsonString); import 'dart:convert'; ...
Mıktad Tahir Durak's user avatar
0 votes
1 answer
223 views

error: Non-nullable instance field 'reverseMap' must be initialized. Flutter

I'm using a service to create api from xml. I created model file from response. My model file is: // To parse this JSON data, do // // final economylistXml = economylistXmlFromJson(jsonString);...
Mıktad Tahir Durak's user avatar
0 votes
0 answers
50 views

Showing detail page after search in Flutter not working

I am trying to mix two things and that is horribly going wrong. Thought I could pull it off, but nope. I am using a separate search functionality that checks my URL to fetch the posts I am using the ...
Johan's user avatar
  • 965
0 votes
2 answers
216 views

Make links clickable in Flutter if rendered via Wordpress JSON API

Is there a way we can make the links in Flutter clickable if they are being fetched via JSON API? I mean, I can see that my links get a different color, but when I try to click on it, nothing happens. ...
Johan's user avatar
  • 965
0 votes
2 answers
4k views

NoSuchMethodError: Class 'String' has no instance method 'toDouble'. flutter

I'm trying to call an API. This is my model : // To parse this JSON data, do // // final hisselist = hisselistFromJson(jsonString); import 'dart:convert'; Hisselist hisselistFromJson(String ...
Mıktad Tahir Durak's user avatar
0 votes
1 answer
1k views

Class '_InternalLinkedHashMap<String, dynamic>' has no instance getter 'name'. Receiver: _LinkedHashMap len:7 Tried calling: name Flutter

im trying to call an api. This is model : // To parse this JSON data, do // // final economylist = economylistFromJson(jsonString); import 'dart:convert'; Economylist economylistFromJson(...
Mıktad Tahir Durak's user avatar
0 votes
3 answers
331 views

My app doesn't recognize data from model file

Hello this is my model file; // To parse this JSON data, do // // final hisselist = hisselistFromJson(jsonString); import 'dart:convert'; Hisselist hisselistFromJson(String str) => ...
Mıktad Tahir Durak's user avatar
0 votes
1 answer
221 views

Flutter rest api authentication

The accounts we added with createuser in Firebase authentication appear in the authentication section in firebase. Is it possible to do this with a rest service, not with authentication, and will it ...
grkm1999's user avatar
  • 1,231
0 votes
2 answers
55 views

Variable value update scope in dart

String name = "Jack"; String aName = "John"; if (!newChapter) { example.... } else { http.get(Uri.parse("https://api.quran.com/api/v4/chapters/" +...
Shamsudeen McHalwai's user avatar
-1 votes
1 answer
124 views

If I give changes in my api then how I can show that changes in my flutter ui without button?

if changes in my api then how to use setstate in my flutter app Generally I used to updata my screen to back then come at that screen plz any body give answer to that question plz
himanshu negi's user avatar
0 votes
1 answer
31 views

I am having issues with futurebuilder with list view builder | flutter

I try to get data from the API but not getting data. just getting instance of ModelName... I am also not able to get the length of the snapshot.data.length. I read some blogs but didn't work it. I ...
swapnil mane's user avatar
0 votes
1 answer
1k views

How to pass List<String> as value into json body in Flutter API call

In Postman, I am passing value as picture. And getting success response also. I have been trying to POST the API with this value through code but no luck yet.
Mimu Saha Tishan's user avatar
0 votes
1 answer
64 views

Flutter display nested json in ListView return type String is not a subtype of type 'Map<String, dynamic>' in type cast flutter

JSON RESPONSE { "data": { "Address": "xyz", "CityID": "1", "CityName": "xyz", "CompanyName": "xyz", "...
Panchal Ravi's user avatar
0 votes
1 answer
132 views

How to Parse Nested JSON ln Flutter?

{ "data": { "Address": "ff9", "CityID": "1", "CityName": "Ahmedabad", "CompanyName": "bs Soffy", "...
Panchal Ravi's user avatar
0 votes
1 answer
307 views

Flutter Api not working with web and release apk but working in debugmide

Why Rest Api Not Working In Flutter Web and build apk only working(fetching info) in debug mode
Rana Ali Ashar's user avatar
-1 votes
1 answer
409 views

How to add or remove rest api array list data

I wanna add some data or string to an array list strings in my rest api data, an it's not working. I don't know why. Here is my api data which i got from my api in my local server the json data is ...
abdifatah nour's user avatar
1 vote
2 answers
7k views

How to fix: value of type 'Map<String, dynamic>', but got one of type 'List<dynamic>'

I am trying to pull data from a local restful API. I have already successfully did it with a single data collection. Now I am trying a list and I am running into this issue. Error: Expected a ...
Aiden P's user avatar
  • 53
0 votes
1 answer
844 views

Create a local REST API for PostgreSQL

I hope you are doing well. I have some questions or rather a guide I just finished a training in SQL, and I chose PostgreSQL as my DBMS. Before I start, I'll give you a briefing to put you in the ...
Steeven Delucis's user avatar
1 vote
2 answers
1k views

Facing some issues in Flutter REST API using with JWT token

I'm facing some issues in Flutter REST API using with JWT token Here the header authentication was not passing properly. But it working good in Postman **Example Code:** String url = "...
Gnanaprakash's user avatar
0 votes
1 answer
338 views

Flutter 500 error on API when trying to make authenticated requests

I'm trying to make authenticated requests, but I get 500 errors. when I change my token, I get 401 error which is not authenticated meaning. Here is my code: import 'dart:convert'; import 'dart:io'; ...
Mıktad Tahir Durak's user avatar
0 votes
1 answer
1k views

Flutter getting data from a map API

hi am new to flutter and i need to get data from a map using API I m struggling at the moment and don't know what to do I always keep getting a error Error '_InternalLinkedHashMap<String, dynamic&...
Aziz Lachkar's user avatar
0 votes
2 answers
407 views

Flutter API : How to post an "int" to a Json file without converting to a String?

Future<DataModel?> submitData(String name, int age) async { var response = await http.post(Uri.http("localhost:3000", "users"), body: { "name" : name, &...
Hamou Ouyaba's user avatar
  • 1,449