What is the purpose of async and yield in Dart?*

 Used to create Streams easily.

Example:

Stream<int> numbers() async* { for (int i = 1; i <= 5; i++) { yield i; // emits value } }

Comments

Popular posts from this blog

1. What is Flutter?

What is FutureBuilder and StreamBuilder?