Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web support? #12

Open
shriharsha-bhagwat opened this issue Dec 20, 2019 · 1 comment
Open

Web support? #12

shriharsha-bhagwat opened this issue Dec 20, 2019 · 1 comment

Comments

@shriharsha-bhagwat
Copy link

shriharsha-bhagwat commented Dec 20, 2019

Somehow i am unable to run the project on web. I could run it on mobile devices. But when i run it on i get a blank page. The terminal has following logs :
Launching lib/main.dart on Chrome in debug mode...
Building application for the web...
Attempting to connect to browser instance..
Debug service listening on ws://127.0.0.1:61156/xUL-4mzprks=

and in Console :

Uncaught (in promise) Error: Unsupported operation: Platform.operatingSystem
at Object.throw
[as throw] (errors.dart:196)
at Function._operatingSystem (io_patch.dart:241)
at Function.get operatingSystem [as operatingSystem] (platform_impl.dart:62)
at get _operatingSystem (platform.dart:73)
at Function.desc.get [as _operatingSystem] (utils.dart:77)
at get isAndroid (platform.dart:135)
at Function.desc.get [as isAndroid] (utils.dart:77)
at _init (app.dart:46)
at _init.next ()
at runBody (async_patch.dart:86)
at Object._async [as async] (async_patch.dart:125)
at Object._init (app.dart:45)
at createApp (app.dart:133)
at createApp.next ()
at runBody (async_patch.dart:86)
at Object._async [as async] (async_patch.dart:125)
at Object.createApp (app.dart:53)
at main (main.dart:7)
at main.next ()
at runBody (async_patch.dart:86)
at Object._async [as async] (async_patch.dart:125)
at Object.main$ [as main] (main.dart:5)
at main$ (main_web_entrypoint.dart:13)
at main$.next ()
at onValue (async_patch.dart:47)
at _RootZone.runUnary (zone.dart:1381)
at _FutureListener.thenAwait.handleValue (future_impl.dart:140)
at handleValueCallback (future_impl.dart:682)
at Function._propagateToListeners (future_impl.dart:711)
at async._AsyncCallbackEntry.new.callback (future_impl.dart:391)
at Object._microtaskLoop (schedule_microtask.dart:43)
at _startMicrotaskLoop (schedule_microtask.dart:52)

@o1298098
Copy link
Owner

o1298098 commented Dec 21, 2019

No, because flutter web does not support "dart: io" right now.
https://flutter.dev/docs/development/platform-integration/web#can-i-use-dartio-with-a-web-app
flutter/flutter#47416

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants