Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While assigning Predicate to any date except current date. Getting Exception- 'Null' is not a subtype of type 'num'<…> #71

Open
jashan55 opened this issue Apr 9, 2024 · 1 comment

Comments

@jashan55
Copy link

jashan55 commented Apr 9, 2024

Describe the bug
I am simply trying to query the cardiogram with the following Predicate

final results = await HealthKitReporter.electrocardiogramQuery(
Predicate(
DateTime.now().add(Duration(days: -7)),
DateTime.now(),
),
withVoltageMeasurements: false,
);

it returns - Exception 'Null' is not a subtype of type 'num'<…>

instead of previous date, if I pass the current date it is executing.

Expected behavior
Expected behaviours is list of Electrocardiogram between the given dates.

@jashan55 jashan55 changed the title While assigning Predicate to any date before now. Return 'Null' is not a subtype of type 'num'<…> While assigning Predicate to any date except current date. Getting Exception- 'Null' is not a subtype of type 'num'<…> Apr 9, 2024
@jashan55
Copy link
Author

jashan55 commented Apr 9, 2024

Is there any other way to get all ECG's without providing predicate? I think there is nil option in health kit native query. Do we have that implementation here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant