Using "dart:html" in flutter 1.9+

255 views
Skip to first unread message

Robin Maass

unread,
Sep 12, 2019, 3:09:59 AM9/12/19
to Flutter Development (flutter-dev)
The dart:html library was accessible in a flutter web applications prior to flutter 1.9

It's needed for important use cases like file picker, drag and dropping files, cookies, etc...(because dart:io cannot be used in flutter web apps)

How is it possible to use the dart:html library in flutter web apps now after the web support has been merged.
Or, is there another way to access browser elements?


Rodrigo López

unread,
Sep 12, 2019, 3:12:43 AM9/12/19
to Flutter Development (flutter-dev)
So far this is the only package that worked for me, but is a WiP, and still has lots of APIs unimplemented.
https://pub.dev/packages/universal_html

Robin Maass

unread,
Sep 12, 2019, 3:24:34 AM9/12/19
to Flutter Development (flutter-dev)
Thanks...seems to work!

Jimmy Aumard

unread,
Sep 12, 2019, 3:27:27 AM9/12/19
to Robin Maass, Flutter Development (flutter-dev)
On the fork we were able to use dart:html directly with HtmlView and ui.platformViewRegistry.registerViewFactory but I’m not able to find ui.platformViewRegistry.registerViewFactory in the flutter api.
Maybe that part didn’t has been merged yet.
> --
> You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/0ac25f23-bbea-43f5-bcaf-b99fe9872cee%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages