kvs-coder / health_kit_reporter

A Flutter wrapper for the HealthKitReporter library
https://pub.dev/packages/health_kit_reporter
MIT License
38 stars 38 forks source link

Is it possible to get separate characteristics? #29

Closed AlexanderZgersky closed 3 years ago

AlexanderZgersky commented 3 years ago

I have to get BirthDate and BiologicalSex in my app, for this purposes I use HealthKitReporter.characteristicsQuery() method. I've faced with the following problem. I get an exception _TypeError (type 'Null' is not a subtype of type 'String') in case if I request permissions only for CharacteristicType.dateOfBirth , CharacteristicType.biologicalSex and then call HealthKitReporter.characteristicsQuery(). As result I have to request permissions for all characteristics and then call HealthKitReporter.characteristicsQuery() to get only BirthDate and BiologicalSex. Is it possible to get these characteristics without requesting additional permissions?

kvs-coder commented 3 years ago

Hi @AlexanderZgersky

Thank you for your report and using this package.

Indeed, there is an issue with the parsing. I made a fix and published a new version 1.4.1

AlexanderZgersky commented 3 years ago

@VictorKachalov Thank you for your support, after upgrading to version 1.4.1, the problem disappeared.