prod method Null safety

dynamic prod(
  1. List list
)

Implementation

prod(List list) {
  var product = flatten(list).reduce((a, b) => a * b);
  return product;
}