Created
August 3, 2019 13:47
-
-
Save zolotyh/0626b8cc15175a3fffb8d2f014a21586 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'dart:io'; | |
void main() async { | |
var controller = StreamController<int>.broadcast(); | |
controller.stream.listen(print); | |
controller.stream.listen(print); | |
controller.sink.add(1); | |
controller.sink.add(1); | |
controller.sink.add(1); | |
controller.sink.add(1); | |
streamMaker().listen(print); | |
} | |
Stream streamMaker() async* { | |
yield* Directory.current.list(); | |
yield 123123; | |
yield await Future.delayed(Duration(seconds: 1), () => 1231231231312); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment