Flutter: Login/http request

I'm trying to do a login screen, using the textformfields for username and password, in which, when I press the login button, it does an http request to a server tryin...

How to send a blank file in multipart request

I am unable to send a blank file using http request in flutter. The server is giving me exception '500'. Also I need to send a parameter "Filename" cuz it's not option...

Flutter HttpException: Connection closed while receiving data

I am making a wallpaper app in Flutter but I get an exception when I use Image.Network() to get the images. <pre><code>HttpException: Connection closed while rece...

Flutter Dio post an object with array

I am trying to post a request to api with an object as" <pre><code>var params = { "item": "itemx", "options": [1,2,3], }; print(params); try...

Doing a POST request on Flutter using the http package

I am trying to hit this endpoint on using flutter. <a href="https://docs.particle.io/reference/device-cloud/api/#generate-an-access-token" rel="nofollow noreferrer">ht...

Upload Image in flutter via restApi (Not working in iOS) working on Android

Hi All not able to upload image on server working fine in android but not in iOS status code = 200 in android status code = 403 in iOS <pre><code>static Upload...

Can I use HTTPS instead of HTTP for host availability?

I just started setting up Flutter (Channel stable, 3.0.0) on my Centos 7 server. I've set up the proxy configuration and added chrome as connected device. I did not in...

Flutter how to handle Image.network error (like 404 or wrong url)

How to handle <code>Image.network</code> when the url is wrong or the destination leads to 404. for example try <pre><code>Image.network('https://image.t...

How can i render the button to main.dart file? Also, is there any way to pass the arguments to named route without using on pressed() of any button?

This is main.dart, currently arguments are passed inside on pressed() of button,I request to suggest a way(if any) to pass the parameters from main.dart(of example) to...

The request hostname is invalid requesting ASP.Net Core 3.1 from Flutter on Android Emulator

I have a flutter app (Android Emulator) and localhost rest API. I'm trying to connect to the API from the app, but the hostname is invalid. I tried localhost, 10.0.2.2...

Async and await tasks take too much time

I need to call all APIs and store a local database before login. I used the sqflite plugin. <strong>can't add background running, that's why I used await</strong>....

Writing data to an existing file in the host server using http in flutter

I want to make a json file on the server, and then update this json file using flutter http method in my app. I will get user ID, and if the user ID is already present...

How to encode Object to Json in flutter

I have a Subject object <pre><code>class Subject { String subjectName; int pages; int fullMarks; Future&lt;Map&lt;String, dynamic&gt;&gt; toJson() async {...

Flutter type _InternalLinkedHashMap&lt;String, dynamic&gt; is not a subtype of type List&lt;dynamic&gt;

I'm a Flutter language learner, new to this world, <img src="https://i.stack.imgur.com/LybBB.png" alt="Code Example" /> <a href="https://i.stack.imgur.com/fRj8u...

How to make a POST request in a flutter for web API

I try writing a common POST request method but it's getting below error <pre><code>Future&lt;dynamic&gt; requestMethod() async { var url = "https://testurl";...