We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
health
12.0.1
The method _alignValue(HealthDataType) has a repeated check for SLEEP_ASLEEP and only covers 5 of the 10 possible SLEEP types:
_alignValue(HealthDataType)
SLEEP_ASLEEP
SLEEP
static double _alignValue(HealthDataType type) => switch (type) { HealthDataType.SLEEP_IN_BED => 0, HealthDataType.SLEEP_ASLEEP => 1, HealthDataType.SLEEP_AWAKE => 2, HealthDataType.SLEEP_ASLEEP => 3, HealthDataType.SLEEP_DEEP => 4, HealthDataType.SLEEP_REM => 5, HealthDataType.HEADACHE_UNSPECIFIED => 0, HealthDataType.HEADACHE_NOT_PRESENT => 1, HealthDataType.HEADACHE_MILD => 2, HealthDataType.HEADACHE_MODERATE => 3, HealthDataType.HEADACHE_SEVERE => 4, _ => throw HealthException(type, "HealthDataType was not aligned correctly - please report bug at https://github.com/cph-cachet/flutter-plugins/issues"), };
https://github.com/cph-cachet/flutter-plugins/blob/master/packages/health/lib/src/health_plugin.dart#L1105
The types are:
SLEEP_ASLEEP, SLEEP_AWAKE_IN_BED, SLEEP_AWAKE, SLEEP_DEEP, SLEEP_IN_BED, SLEEP_LIGHT, SLEEP_OUT_OF_BED, SLEEP_REM, SLEEP_SESSION, SLEEP_UNKNOWN,
https://github.com/cph-cachet/flutter-plugins/blob/master/packages/health/lib/src/heath_data_types.dart#L76
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Plugin Name
health
Plugin Version
12.0.1
Describe the bug
The method
_alignValue(HealthDataType)
has a repeated check forSLEEP_ASLEEP
and only covers 5 of the 10 possibleSLEEP
types:https://github.com/cph-cachet/flutter-plugins/blob/master/packages/health/lib/src/health_plugin.dart#L1105
The types are:
https://github.com/cph-cachet/flutter-plugins/blob/master/packages/health/lib/src/heath_data_types.dart#L76
The text was updated successfully, but these errors were encountered: