Skip to content

Instantly share code, notes, and snippets.

@lesnitsky
Last active April 22, 2020 14:52
Show Gist options
  • Save lesnitsky/9858b3f3ed35493b7a5bcd7b304b4046 to your computer and use it in GitHub Desktop.
Save lesnitsky/9858b3f3ed35493b7a5bcd7b304b4046 to your computer and use it in GitHub Desktop.
llib:dart_utils
import 'dart:io';
import 'dart:async';
StreamTransformer<T, T> interrupt<T>() {
return StreamTransformer.fromHandlers(handleData: (data, sink) {
stdin.readLineSync();
sink.add(data);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment