cph-cachet / flutter-plugins

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

[Health] improve support for sleep stages #1026

Closed SlimShadyIAm closed 2 months ago

SlimShadyIAm commented 3 months ago

Previously, not all the sleep stages that are supported in HealthKit and Health Connect were supported in the Health package. On the iOS side, some of the sleep stages were supported but undocumented. This PR improves support and documentation for all possible sleep stages across both platforms:

Closes #985.

Overview of the changes

Stage iOS Android Notes
SLEEP_ASLEEP on iOS this refers to asleepUnspecified
SLEEP_AWAKE
SLEEP_AWAKE_IN_BED (NEW)
SLEEP_DEEP combined
SLEEP_IN_BED
SLEEP_LIGHT combined - on iOS this refers to asleepCore
SLEEP_OUT_OF_BED
SLEEP_REM combined
SLEEP_UNKNOWN (NEW)