Is there a way of taking single character (integer) keyboard inputs from the user and storing them to a variable in a Dart command-line app? I've tried something like:
Stream cmdLine = stdin
.transform(new StringDecoder())
.transform(new LineTransformer());
StreamSubscription cmdSubscription = cmdLine.listen(
(line) => (choice = line);
cmdSubscription.cancel(););
In an attempt to store a keyboard input into the variable 'choice' and many slight variations of this code but can't get it to work.