About using Stream Controllers to build stream

Hi About the last part of chapter 13 Streams. The book introduce a method to build a stream from scratch using the StreamController class.

The code in main starts with Future<void> main() async. Isn’t better just to keep void main()… This is because there is no await keyword inside the body of main. The use of async here is just redundant?

1 Like

Good point. I had probably just kept the Future return type from the previous examples in the chapter. I’ll plan to update this in the next edition. Thank you.

1 Like