toStream<T> method
Implementation
Stream<T> toStream<T>() async* {
final iterator = js_util.getProperty(this, _asyncIterator);
final callable = js_util.callMethod(iterator, 'call', []);
while (true) {
final result = await _next<T>(callable);
if (result.done) {
break;
}
yield result.value;
}
}