average property

double? get average

Average (mean). Returns null if empty.

Implementation

double? get average {
  final List<num> list = toList();
  if (list.isEmpty) return null;
  return sum.toDouble() / list.length;
}