sum property Null safety
The sum of the elements.
The sum is zero if the iterable is empty.
Implementation
int get sum {
var result = 0;
for (var value in this) {
result += value;
}
return result;
}
The sum of the elements.
The sum is zero if the iterable is empty.
int get sum {
var result = 0;
for (var value in this) {
result += value;
}
return result;
}