I have one Stream of type T. I want to convert into some other type like Stream of E. Can someone tell me how can i achieve it?
I have one Stream of type T. I want to convert into some other type like Stream of E. Can someone tell me how can i achieve it?
You will want to use the map function. Its purpose is just this
https://api.dart.dev/stable/2.9.1/dart-async/Stream/map.html
A simple example:
var intstream = Stream.fromIterable([1,2,3]);
var stringstream = intstream.map<String>((e){return "$e";});