Console application - StringDecoder stdin
问题 The following or similar was shown for terminal input, however terminating input with ctl-d is not good. Is there another way to exit from this "loop"? import "dart:io"; void main() { stdout.write("Enter Data : "); new StringDecoder().bind(stdin).listen((String sInput){}); //// Do something with sInput ............ } 回答1: You can terminate a dart program by running the exit method when using dart:io void exit(int status) Exit the Dart VM process immediately with the given status code. This