'List<Object> to Stream<List<Object>> Flutter?

How to Convert List to Stream<List> in Dart , Flutter. I am trying to convert List of Objects to Stream List.



Solution 1:[1]

you can do it like this :

 Stream<List<String>> _currentString = watchForSomeStream();

 _currentString.listen((listOfStrings) {
    for (String myString in listOfStrings) {
      print(myString);
    }
 });

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Amir Mohammad Shams