total property

T get total

Implementation

T get total {
  final value = _.reduce((a, b) => a + b);
  if (T == int) return value.toInt() as T;
  return value.toDouble() as T;
}