Basically I have a FormData object on the Javascript side in Flutter Web.
I need to send this object to Dart in order to make a http POST request, having the object's fields (including some eventual Blob/File field, as well) as the payload. The way I send this object to Dart is by registering a callback in Dart on the js.context window object, and calling that from the Javascript side.
Now, I've tried many different ways to achieve this:
- Get all it's fields using the spread operator,
[...formData] JSON.stringifyit and send it as a StringJSON.stringifyit's.entries()JSON.stringifyit'skeys()andvalues()individually- some other work-arounds I found on the internet
I was able to send FormData's "simple" fields (String, number, Array, Object) BUT NOT FILE/BLOBs using theese approaches.
Is there any way to get that FormData object as a whole? That is, including the Files/Blobs it might contain, if any.
Thanks