|
|
|
@ -241,10 +241,11 @@ class HealthProvider with ChangeNotifier {
|
|
|
|
int count = 0;
|
|
|
|
int count = 0;
|
|
|
|
selectedData.forEach((key, dataPoints) {
|
|
|
|
selectedData.forEach((key, dataPoints) {
|
|
|
|
for (var dataPoint in dataPoints) {
|
|
|
|
for (var dataPoint in dataPoints) {
|
|
|
|
total += num.parse(dataPoint.actualValue).toInt();
|
|
|
|
total += num.parse(dataPoint.actualValue);
|
|
|
|
count++;
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
print("total count is $count and total is $total");
|
|
|
|
averageValue = count > 0 ? total / count : null;
|
|
|
|
averageValue = count > 0 ? total / count : null;
|
|
|
|
notifyListeners();
|
|
|
|
notifyListeners();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|