returnValue property
See return().
This is a nullable getter because not all iterators support this method.
If the value is null or omitted, the callback is called with no value.
It's not possible to call the callback with a null value.
Implementation
JSIteratorResult<T> Function([T? value])? get returnValue =>
// Make sure to pass along whether an argument was passed or not, because
// that's observable from JavaScript.
_nullableReturnValue == null
? null
: ([value]) => value == null ? _returnValue() : _returnValue(value);