There's an issue where when useHealthConnectIfAvailable is set to true it is unable to be set back to false. This locks the user into health connect even after setting back to false.
To Reproduce
Set:
final health = Health();
await health.configure(
useHealthConnectIfAvailable: true,
);
Then try to set it back to false:
final health = Health();
await health.configure(
useHealthConnectIfAvailable: false,
);
It will still attempt to use Google fit as useHealthConnectIfAvailable does not get updated.
Expected behavior
Expected to be able to retrieve Google fit data after setting useHealthConnectIfAvailable to false.
Actual behavior
As useHealthConnectIfAvailable is stuck on true it still tries to retrieve health connect data instead of google fit
Device / Emulator and OS
Android
Describe the bug
There's an issue where when useHealthConnectIfAvailable is set to true it is unable to be set back to false. This locks the user into health connect even after setting back to false.
To Reproduce
Set:
Then try to set it back to false:
It will still attempt to use Google fit as useHealthConnectIfAvailable does not get updated.
Expected behavior
Expected to be able to retrieve Google fit data after setting useHealthConnectIfAvailable to false.
Actual behavior
As useHealthConnectIfAvailable is stuck on true it still tries to retrieve health connect data instead of google fit