sumByDouble method
Sum values collum
specified in Iterable
Implementation
double sumByDouble(double? Function(E? element) collum,
{int? fractionDigits}) {
double sum = 0;
this?.forEach((element) {
double? c = collum(element);
if (c != null) {
sum += c;
}
});
if (fractionDigits != null) {
sum = sum.toStringAsFixed(fractionDigits).toDouble();
}
return sum;
}