Flutter dio how to upload image
i try to send image to machine learning model with fast api it works fine with postman but when i try with dio package it gives me error the type is File and i want it to be png or…
i try to send image to machine learning model with fast api it works fine with postman but when i try with dio package it gives me error the type is File and i want it to be png or…
I'm developing my own API to receive files and using Flutter to create the app. So I'm sending files to and API, using Flutter Dio, and I keep getting error 406. 'file': await MultipartFile.fromFile(file.path), Turns out, I found out if…
Im using StreamController to track the progress of uploading an image using Dio, so when i sink a value in my stream i trigger an event to emit new state to rebuild my widget, the problem is it does not…
I have List of images. and i need to upload that list of images from server using dio. and also need to upload using MultipartFile.fromFile in dio. so, how can i upload it ? 'document': await MultipartFile.fromFile(file[index].path), i try this...…
Error: E/flutter (28049): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:object_mapper/src/mappable.dart': Failed assertion: line 8 pos 12: 'constructor != null': RegistrationResponse is not defined in Reflection.factories E/flutter (28049): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61) E/flutter (28049): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5) E/flutter (28049): #2 new Mappable (package:object_mapper/src/mappable.dart:8:12) E/flutter (28049):…
Im using dio to retrieve large json data from my Laravel backend, the problem is that, sometimes it works perfectly and it gets parsed correctly, and sometimes it returns: FormatException: Unexpected character Here is how im using dio: class CartRepository…
I have a requirement that my flutter app should not call multiple api within same timestamp/second. i am working with a IoT device which has its own server and the requirement is it cannot handle multiple api calls in a…
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 use Dio to getting response, and this is my modeling classes: import 'package:shoppingcenter/screens/homePage.dart'; class MALL { late final int id; late final String name; late final String images; MALL({required this.id, required this.name, required this.images}); factory MALL.fromJson(Map<String, dynamic> data) {…
An API gives me json response like this: [{"version": "v3.5"}, {"setup": true}, {"address": "e7d398b"}, {"connected": true}, {"active": true}, {"id": "ce7143"}, {"genuine": true}] As you can see, this is a list of objects. I tried parsing it like this using quicktype…