flutter-plugins icon indicating copy to clipboard operation
flutter-plugins copied to clipboard

implement apple healthkit mindfulness data addition

Open cancng opened this issue 2 years ago • 1 comments

iOS apps were crashing when saving data in the MINDFULNESS data type. Since the MINDFULNESS data type receives HKCategoryValue.notApplicable i.e. 0 instead of the value, a separate method has been added to fix this error.

cancng avatar Sep 15 '23 08:09 cancng

https://github.com/cph-cachet/flutter-plugins/issues/660 this issue solves everything by setting the value to 0

e.g.

success &= await Health().writeHealthData(value: 0, type: HealthDataType.MINDFULNESS, startTime: DateTime(now.year, now.month, now.day, now.hour, now.minute-15), endTime: now);

Sebo-the-tramp avatar Oct 20 '24 17:10 Sebo-the-tramp

a swift refactor is being roll out if the issue still persists let us know

iarata avatar Apr 30 '25 15:04 iarata