cph-cachet / flutter-plugins

A collection of Flutter plugins developed by CACHET
551 stars 681 forks source link

[Health] Support for Caffeine value #921

Closed shubhamsinghmutualmobile closed 8 months ago

shubhamsinghmutualmobile commented 8 months ago

Would it be possible for the library to support Caffeine tracking as well since it is available on both Android (Health Connect) and iOS (Apple Health)?

API for Android

It is available as a parameter named caffeine in the NutritionRecord class

API reference

https://androidx.tech/artifacts/health.connect/connect-client/1.1.0-alpha03-source/androidx/health/connect/client/impl/platform/records/RecordConverters.kt.html

Screenshot

API for iOS

It is available as the dietaryCaffeine type property

API reference

https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier/1615498-dietarycaffeine

Screenshot

Even if you won't be able to provide support for it, please do let me know anyways so that I could try and see if I can find some other solution.

shubhamsinghmutualmobile commented 8 months ago

@bardram Could you please either assign someone or have a look at this issue yourself? It should not take more than a few minutes of your time.

shubhamsinghmutualmobile commented 8 months ago

@bardram I have added support for this feature ✅ The PR is tiny and shouldn't take more than a few minutes for you to review.