according to this answer
the dart:io libraries are only for the server/command-line, so they can't be compiled with dart2js.
is it possible to read from stdin and write to stdout with dart2js e.g:
$ java -jar ../../Downloads/rhino1_7R4/js.jar myjs.js < in.txt > out.txt
I'm considering editing the dart2js generated file and adding something like:
importPackage(java.io);
importPackage(java.lang);
scan = new BufferedReader( new InputStreamReader(System['in']) );