Questions tagged [flutter-http]
241 questions
-1
votes
2 answers
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 " + nServer + " and port " + nPort + " and mount point : " +…

Tom3652
- 2,540
- 3
- 19
- 45
-1
votes
4 answers
How to do infinite scrolling in flutter?
I want to scroll infinitely as much my product has. I have total 412 pages. When I scroll to the end I want to show more item of next pages. that means infinite scrolling. how to do this? i have implemented the ScrollController.
this is my…

imran sifat
- 165
- 1
- 13
-1
votes
2 answers
Http post request error in flutter but work in postman
I am learning login registration using mongodb atlas. But I am facing some problems. When i send http post requests for creating new user in emulator its not working and throw some errors. But the same thing works in postman. I can easily create new…

imran sifat
- 165
- 1
- 13
-1
votes
1 answer
Flutter API Call using http
I'm trying to get json data from Api by using the following
Future getsubjectList(
String userId, String accountId) async {
final response = await http
.get(Uri.https(_baseUrl, 'v1/package/subject-details'), headers:…

Febin Johnson
- 277
- 1
- 6
- 21
-1
votes
2 answers
What is the correct way to execute initial network request in Flutter?
I have the following code, to get initial data for the screen and this SchedulerBinding seems to be a hack, but if I remove it, request data is lost.
I think it happens due to the fact widgets(streamBuilders etc.) are not yet built.
Any ideas how…

Void
- 1,129
- 1
- 8
- 21
-1
votes
1 answer
Flutter HTTP issues
With the new update, some HTTP functionality has changed. This function used to work and now it does not. Can someone explain what changed?
import 'package:http/http.dart';
void getData() async {
Response response = await…

Korupt
- 11
- 2
-1
votes
2 answers
get data of specific user from rest api in flutter
everyone I have build a rest API which has one to one relationship from parent to child. one parent can have many children.
this could be possible link of endpoint
https://example.com/api/child?email=abc@gmail.com
and My json result is
{
"data": [
…

imran
- 49
- 1
- 8
-1
votes
1 answer
There are i have one list List id = ["abc","abc","abc"],how can i parse into json string because i can pass in http.post(body) in flutter
List _productIds = widget.productIds;
String _storeId = widget.storeid;
String jsonProductId = jsonEncode(_productIds); //that give me[\"abc\",\"abc\",\"abc\"]

Kishan Boricha
- 31
- 2
-1
votes
2 answers
Flutter: Convert Map to Json
I am trying to convert a complex map to Json String to pass to my Firebase Realtime Database.
The Map:
_data = {
'name':{
'description':'This is my description',
'price': '700'
},
'name2':{...}
}
What I…

Ali Solanki
- 640
- 7
- 16
-1
votes
1 answer
Request blocked by CORS policy only when app is hosted in Firebase
My Flutter web app needs to call an API when the user submits a contact form. The API is that of a discord bot that proceeds to post the message in a specific channel on my Discord server. This setup works fine for two other apps that are using the…

Eight Rice
- 816
- 7
- 24
-1
votes
1 answer
Flutter: NoSuchMethodError: The getter 'length' was called on null
I am trying to get some data from my firebase realtime database.This is my code in order to get the data through http request. I am receiving the data as well and can see it in the logs.
return http.get(placeUrl).then((value) {
var _extractedData…

Ali Solanki
- 640
- 7
- 16
-1
votes
1 answer
length of server response in flutter http package
I am using future builder for building list view. I am getting the response from server. I am getting exactly what i need. There is single error that i am trying to resolve. The error is when i fetch data from server using http.get method : String…

M.Adnan Ijaz
- 91
- 10
-1
votes
1 answer
Flutter Image upload with http and multipart
I am trying to upload user information (imagePath, firstName, lastName) to a server with the help of a http request.
Future userSignUp({
String firstName,
String lastName,
File imagePath,
}) async {
Map…

dhruvin prajapati
- 184
- 1
- 3
- 15
-1
votes
1 answer
the argument type 'JsObject cant be assigned to the parameter type 'BuildContext '
hi guys so i was trying to add some error check code in my page 'product_edit' to handle any potential http response error
so this is my page
product_edit.dart
==============================
import 'package:flutter/material.dart';
import…

Ahmed aziz67
- 11
- 5
-2
votes
1 answer
Flutter downloads partial files from Google Drive and One drive
Flutter can not download files from Google Drive or OneDrive, zip or otherwise.
The files just get partially downloaded whereas files from most other links from websites etc are downloaded completely.
For example this Google Drive link will only get…

mohit sharma
- 89
- 2
- 10