Flutter Web: Converting dart:io File to dart:html File


Is there a way to convert dart:io File object to dart:html File? I tried html.File file = dartFile as html.File and it isn’t working


No. The two file objects are completely unrelated.

I am not aware of any platform which has both the dart:io and the dart:html library available, so even being able to import both in the same program is surprising.

Answered By – lrn

Answer Checked By – Marie Seifert (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *