Skip to content

IListNullableOps<A> ​

extensionIListNullableOps<A>onIList<A?>

Operations available when IList elements are nullable.

Methods ​

noNulls() extension ​

IList<A>noNulls()

Returns a new list with all null elements removed.

Available on IList<A>, provided by the IListNullableOps<A> extension

Implementation
dart
IList<A> noNulls() => foldLeft(nil(), (acc, elem) => elem == null ? acc : acc.appended(elem));