presentGenericStream method

void presentGenericStream()

..

Implementation

void presentGenericStream() {
  var data = intList; // int's, valid
// var data = ["1","2","3","4","5"]; // strings, not valid
  Stream stream = Stream<int>.fromIterable(data); // Stream<int>
  stream.listen((value) {
    // value must be an int
    print("listen: $value  \n  ---   OK  --- \n");
  });
}