-
Notifications
You must be signed in to change notification settings - Fork 22
StreamedList
Francesco Mineo edited this page Mar 15, 2019
·
1 revision
This class has been created to work with lists. It works like StreamedValue. To modify the list (e.g. adding items) and update the stream automatically, use these methods:
AddAll
addElement
clear
removeAt
removeElement
replace
replaceAt
For other direct actions on the list, to update the stream call
the refresh
method instead.
e.g. adding an item:
streamedList.addElement(item);
it is the same as:
streamedList.value.add(item);
streamedList.refresh();
final streamedList = StreamedList<String>();
// Add to the streamed list the string from the textfield
addText() {
streamedList.addElement(streamedText.value);
// Or, as an alternative:
// streamedList.value.add(streamedText.value);
// streamedList.refresh(); // To refresh the stream with the new value
}