In the following code f.onChildAdded
is an Instance of '_BroadcastStream<Event>'
:
f.onChildAdded.forEach((e) {
print(e.snapshot.val());
//TODO: Turn this somehow into a list
});
The print
outputs each item fine, and now I'd like to turn it into a list that's friendly with Polymer's repeat="{{item in items }}"
magic.
- How do I turn it into a list?
List myList = new List();
andmyList.add(e.snapshot.val());
isn't helping me there. - How do I pass that from my
main()
in my index.dart to my-element.dart?
FWIW, here's my project: https://github.com/DaveNotik/dartstack. Any other guidance as I get a handle on this would be great!