isNull<T> function

bool isNull<T>(
  1. T? x
)

Tests whether the given argument x is null.

Useful as a predicate for filter-type higher-order functions.

['a', null, 'c', null, 'd'].any(isNull) // true

Implementation

bool isNull<T>(T? x) => x == null;