Answers for "dart async stream"

0

dart async stream

Future<int> sumStream(Stream<int> stream) async {
  var sum = 0;
  await for (var value in stream) {
    sum += value;
  }
  return sum;
}
Posted by: Guest on April-17-2021

Browse Popular Code Answers by Language