Open
Description
Currently, for collection-for's on nullable collections, we need a null check:
List<int>? myInts = ...;
if (myInts != null) {
for (final i in myInts) {
// use i
}
}
It would be nice if we could have a null-aware version of this syntax, something along the lines of
for(final i in myInts?) ...
or
for(final i in? myInts) ...
which would skip iteration if the iterable were null
.
Sorry if this already exists and I'm just (null-)unaware of it :)