filterNot method

  1. @useResult
KtList<T> filterNot(
  1. bool predicate(
    1. T
    )
)

Returns a list containing all elements not matching the given predicate.

Implementation

@useResult
KtList<T> filterNot(bool Function(T) predicate) {
  final list = filterNotTo(mutableListOf<T>(), predicate);
  // TODO ping dart-lang/sdk team to check type bug
  // When in single line: type "DartMutableList<String>' is not a subtype of type 'Null"
  return list;
}