-
Notifications
You must be signed in to change notification settings - Fork 752
Closed
Labels
bugfixa bug fixa bug fix
Description
Plugin Name
health
Plugin Version
12.2.0
Device
Samsung Galaxy S24+
Operating System
Android 15 (One UI 7)
Describe the bug
vitaminC on NutritionHealthValue always null on Health Connect read.
Checked the data in Health Connect to make sure it was set.
Steps to Reproduce
Read Health value for nutrition, print out the data point, vitaminC set to null
var now = DateTime.now();
List<HealthDataPoint> healthData = await health.getHealthDataFromTypes(
startTime: now.subtract(Duration(days: syncDays)),
endTime: now,
types: [HealthDataType.NUTRITION]);
health.removeDuplicates(healthData);
for (var data in healthData) {
print(data);
}
Expected Behavior
vitaminC and other vitamins and minerals to be set, might be easier to make these non nullable and default to 0 instead of null so its easier to pickup these issues.
Actual Behavior
vitaminC is null
I/flutter (26212): HealthDataPoint -
I/flutter (26212): uuid: 1475f535-28a9-4536-bf69-e93387c4571d,
I/flutter (26212): value: NutritionHealthValue - protein: 0.0,
I/flutter (26212): calories: 73.0,
I/flutter (26212): fat: 0.0,
I/flutter (26212): name: Morning snack,
I/flutter (26212): carbs: 18.0,
I/flutter (26212): caffeine: null,
I/flutter (26212): mealType: SNACK,
I/flutter (26212): vitaminA: null,
I/flutter (26212): b1Thiamine: null,
I/flutter (26212): b2Riboflavin: null,
I/flutter (26212): b3Niacin: null,
I/flutter (26212): b5PantothenicAcid: null,
I/flutter (26212): b6Pyridoxine: null,
I/flutter (26212): b7Biotin: null,
I/flutter (26212): b9Folate: null,
I/flutter (26212): b12Cobalamin: null,
I/flutter (26212): vitaminC: null,
I/flutter (26212): vitaminD: null,
I/flutter (26212): vitaminE: null,
I/flutter (26212): vitaminK: null,
I/flutter (26212): calcium: 0.039,
I/flutter (26212): chloride: null,
I/flutter (26212): cholesterol: 0.0,
I/flutter (26212): choline: null,
I/flutter (26212): chromium: null,
I/flutter (26212): copper: null,
I/flutter (26212): unsaturatedFat: null,
I/flutter (26212): fatMonounsaturated: null,
I/flutter (26212): fatPolyunsaturated: null,
I/flutter (26212): fatSaturated: null,
I/flutter (26212): fatTransMonoenoic: null,
I/flutter (26212): fiber: 0.0,
I/flutter (26212): iodine: null,
I/flutter (26212): iron: 0.002299999952316284,
I/flutter (26212): magnesium: null,
I/flutter (26212): manganese: null,
I/flutter (26212): molybdenum: null,
I/flutter (26212): phosphorus: null,
I/flutter (26212): potassium: 0.005,
I/flutter (26212): selenium: null,
I/flutter (26212): sodium: 0.0,
I/flutter (26212): sugar: 15.0,
I/flutter (26212): water: null,
I/flutter (26212): zi
Flutter Logs
Screenshots
No response
Flutter Doctor Output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.29.3, on Microsoft Windows [Version 10.0.26100.4061], locale en-ZA)
[√] Windows Version (11 Pro 64-bit, 24H2, 2009)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.2)
[√] Android Studio (version 2024.3)
[√] IntelliJ IDEA Ultimate Edition (version 2025.1)
[√] Connected device (4 available)
[√] Network resources
• No issues found!
Additional Information
No response
Metadata
Metadata
Assignees
Labels
bugfixa bug fixa bug fix