Open devShakib015 opened 1 year ago
same issue, app is crashing
Same issue for me. App crashes when writing MINDFULNESS data. Other data types seem ok (e.g. SLEEP_IN_BED, STEPS).
Please help!
Same issue for me. App crashes when writing MINDFULNESS data. Other data types seem ok (e.g. SLEEP_IN_BED, STEPS).
Please help!
Nevermind... Setting the data value to 0 resolves the crash.
bool success = await health.writeHealthData(
0, //must be 0 for MINDFULNESS
HealthDataType.MINDFULNESS,
now.subtract(Duration(minutes: 10)),
now,
);
It does work for me! thanks. Worth closing the issue!
Describe the bug
When I try to write MINDFULNESS data using "health.writeHealthData", the app crashes and it lost the connection to device.
It's gives an error message:
Could not cast value of type 'HKCategoryType' (0x1b91dcfc0) to 'HKQuantityType' (0x1b91dcf98).
Screenshots
This is my code! I have tried various ways to do it. But it happens every time.