Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

412
Views
How to cast/convert a browser FormData object to a Dart object, in Flutter Web?

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.stringify it and send it as a String
  • JSON.stringify it's .entries()
  • JSON.stringify it's keys() and values() 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

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!