robbie
robbie

Reputation: 269

Latest stable release (v1.1.1) - The built-in library 'dart:io' is not available on Dartium

My application was working mint until I just updated to the latest version of the Dart SDK and Editor.

When I run the app in Dartium, an error is thrown 'The built-in library 'dart:io' is not available on Dartium'. I am not using dart:io directly but imported lib packages like google_oauth2_client use it. This was all working fine until just an hour or two ago.

I am sort of stuck until this is resolved. Is anyone having the same issue?

Upvotes: 0

Views: 170

Answers (2)

Pixel Elephant
Pixel Elephant

Reputation: 21383

google_oauth2_client has both a browser library and a console library. The console library makes use of dart:io while the browser one does not. Make sure that you are using the browser version. You can see an example of how to do this.

Upvotes: 1

Günter Zöchbauer
Günter Zöchbauer

Reputation: 657268

dart:io isn't compatible with the browser, it's standalone-VM only. If google_oauth2_client uses it, which I doubt the library were not intended for client usage. Have you tried pub upgrade?

Upvotes: 1

Related Questions