listen for stream and print value in dart main function – Flutter
I want to print data.length after listening to this stream but the program executed synchronously. How can I listen to this data stream without using the await-for syntax void main() async { final file = File('assets/text_long.txt'); final stream = file.openRead();…