diff --git a/lib/features/smartwatch_health_data/health_provider.dart b/lib/features/smartwatch_health_data/health_provider.dart index 80a79bb3..4d47ccb8 100644 --- a/lib/features/smartwatch_health_data/health_provider.dart +++ b/lib/features/smartwatch_health_data/health_provider.dart @@ -241,10 +241,11 @@ class HealthProvider with ChangeNotifier { int count = 0; selectedData.forEach((key, dataPoints) { for (var dataPoint in dataPoints) { - total += num.parse(dataPoint.actualValue).toInt(); + total += num.parse(dataPoint.actualValue); count++; } }); + print("total count is $count and total is $total"); averageValue = count > 0 ? total / count : null; notifyListeners(); }