all method

bool all({
  1. T? other,
})

Implementation

bool all({T? other}) {
  var test = other == null
      ? (T v) => v == (T == bool ? true : null)
      : (T v) => other == v;

  for (var i in this) {
    if (!test(i)) {
      return false;
    }
  }
  return true;
}