product method

int product()

Returns the product of this Iterable.

Example: [-2, 3].product() returns -6.

Implementation

int product() {
  var product = 1;
  for (final value in this) {
    product *= value;
  }
  return product;
}