A small plugin for writing nutrition values into HealthKit
- dietaryEnergyConsumed
- dietaryFatTotal
- dietaryFatSaturated
- dietaryCholesterol
- dietaryCarbohydrates
- dietaryFiber
- dietarySugar
- dietaryProtein
- dietaryCalcium
- dietaryIron
- dietaryPotassium
- dietarySodium
- dietaryVitaminA
- dietaryVitaminC
- dietaryVitaminD
Pass a list of maps:
FlutterHkWrite.writeQuantityEntries([
{
"value": model.protein,
"from": DateTime.now()
.millisecondsSinceEpoch ~/
1000,
"to": DateTime.now()
.millisecondsSinceEpoch ~/
1000,
"type": "Protein",
"unit": "gram"
},]
- liter
- G
- KCAL
- MG (Milligramm)
- UG (Microgramm)
The full list is available in parseType method.