presentStreamValidate method

void presentStreamValidate()

..

Implementation

void presentStreamValidate() {
  var data = intList;
  Stream stream = Stream.fromIterable(data);
  var broadcastStream = stream.asBroadcastStream();

  broadcastStream.any((value) => value < 5).then((result) => print(
      "\n  ***  resentStreamValidate  *** \n  Any less than 5?: $result")); // true

  broadcastStream
      .every((value) => value < 5)
      .then((result) => print("All less than 5?: $result")); // false

  broadcastStream.contains(4).then(
      (result) => print("Contains 4?: $result  \n  --  OK  --  \n")); // true
}