without<T> static method

Iterable<T> without<T>(
  1. List<T>? list,
  2. T? removed
)

Implementation

static Iterable<T> without<T>(List<T>? list, T? removed) =>
    (removed == null ? list : list?.where((item) => item != removed)) ?? [];