flutter-plugins
flutter-plugins copied to clipboard
implement apple healthkit mindfulness data addition
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.
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);
a swift refactor is being roll out if the issue still persists let us know