Questions tagged [dio]

Dio is a powerful HTTP client for Dart, which supports interceptors, global configuration, form data, request cancellation, file downloading, timeout, etc.

Dio is a powerful HTTP client for Dart, which supports interceptors, global configuration, form data, request cancellation, file downloading, timeout, etc.

References

Dio Dart package.

664 questions
0
votes
1 answer

other class for Dio in flutter

i'm create a class for dio That all my connections to the server happen in this class Now I want to call onError and onSuccess in other class An example of this was done in Java with an interface thanks
hzr
  • 3
  • 3
0
votes
1 answer

type 'UploadFileInfo' is not a subtype of type 'String' in type cast

Image Reference I am trying to upload a file in flutter using HTTP package with some parameters and some headers. But it's occurring a problem in UploadFileInfo. this is my actual exception: " type 'UploadFileInfo' is not a subtype of type…
Azhar Mughal
  • 155
  • 2
  • 8
0
votes
1 answer

I am not able to upload images and form data to rest api using DIO package in flutter

I am not able to upload image to rest api in flutter I have checked the api its working fine. I am not able to convert the file (image) to a uploadable form, can any one help me with that? I have run flutter doctor -v everything is fine :) Here is…
WaheedHussain
  • 53
  • 2
  • 11
-1
votes
0 answers

Flutter SocketException: Connection reset by peer (OS Error: Connection reset by peer, errno = 104)

I want to post data for login user on an URL stating with https:// I did that with the Dio Package and when I handle the post, the response that i received is Error: SocketException: Connection reset by peer (OS Error: Connection reset by peer,…
Wvxil
  • 37
  • 6
-1
votes
1 answer

Login in Flutter with odoo

I'm designing an app that needs to connect to my odoo erp system. I'm thinking of implementing login. What do you recommend? I had started seeing DIO. The user will have to pass username and password. in the credentials i also have a DB name and i…
-1
votes
1 answer

Flutter Dio Error: Index was outside the bounds of the array

Actually I was using Flutter Dio Package to pass Form Data but Unfortunately I face error like below. Dio Error: DioErrorType.response [log] -------------------------------------------------------- [log] {"code":"Unhandled","message":"Index was…
Joel
  • 180
  • 1
  • 11
-1
votes
2 answers

Issue importing DIO library in Flutter project

I found an error importing package from the 'DIO' library and it's the following: Target of URI doesn't exist: from Android Studio. please see the error in the attached screenshot. I want to get rid of this red marked error. I followed the…
-1
votes
1 answer

How to check upload progress using http package?

Basically how to implement onSendProgress of Dio using the http package? Most solutions online are about reading a file upload progress.
Priyanshu Gupta
  • 461
  • 3
  • 8
-1
votes
1 answer

Flutter Dio helper post return null value

I used Fire Base messaging to send message for another device . i got the key and token of another device but the post just working in postman and i receive notification successfully on my device . but when i use code like below it returns null…
-1
votes
1 answer

Flutter Dio send multipart form with Text and Image array to PHP file on backend

I hope someone can help me. I have a problem with my app, I can't send a form to my backend and save data to mysql database. I use Dio with Flutter to send the form to my backend to a PHP file. I can send multiple images as well as text, and so far…
Federico
  • 41
  • 8
-1
votes
1 answer

Tiva C Dio driver with AUTOSAR method

My graduation project's part is DIO driver for Tiva C MCU with AUTOSAR, I have no idea where and how to start. Are there any useful sources/materials that could help me implement such a thing given that I know nothing about the AUTOSAR methodology…
-1
votes
1 answer

How to stop dio get when the internet is off?

the request is just waiting and not resulting an error, i want an error to be produced when there is no internet but it's just waiting forever i tried sendTimeout: 600000, receiveTimeout: 600000, but same result vscode screenshot
-1
votes
2 answers

how to upload image to server using dio flutter

I want to upload an image from flutter to the server but I am failed. I tried with http package but it not worked. Then i found dio package useful and easy but I am getting following error when I use FormData. the name 'FormData' is defined in the…
swapnil mane
  • 215
  • 5
  • 17
-1
votes
3 answers

Why I do not get response using Dio in flutter?

I am new to dio and I tried to create login function, here is my dio.post code Future loginUser(LoginPost data, String method) async { try { final response = await _dio.post( 'api/users/v1/login/$method', data:…
Parama Artha
  • 147
  • 3
  • 8
-1
votes
1 answer

How to convert curl to url in flutter api?

never worked before with curl APIs so idk. I need to convert curl to html because I cant use at DIO service. Can someone help me please? thank you I changed to http url for safety. curl -X 'GET' \ …