bindOneByIndexStream method
Implementation
void bindOneByIndexStream(Iterable<E> options, Stream<int> other,
[int? initial]) {
{
int? value = initial;
for (int i = 0; i < options.length; i++) {
if (value == i)
add(options.elementAt(i));
else
remove(options.elementAt(i));
}
}
other.listen((int value) {
for (int i = 0; i < options.length; i++) {
if (value == i)
add(options.elementAt(i));
else
remove(options.elementAt(i));
}
});
}