gcappon / fitbitter

A Flutter package to make your life easier when dealing with Fitbit APIs.
https://gcappon.github.io/fitbitter/
BSD 3-Clause "New" or "Revised" License
19 stars 21 forks source link

Error when you don't have data on FitbitCardioScoreData #11

Closed Alejandroem closed 1 year ago

Alejandroem commented 1 year ago

I think this piece of the code might have not been yet moved to null safety, specifically on the file: fitbitCardioScoreDataManager.dart

In these lines

image

I'm getting the next exception:

image

And I'm aware that I don't have data on this metric on my Fitbit, but the package should also handle that case? I think there might be other instances where this also happens?

Alejandroem commented 1 year ago

It also happens when you get FitbitSpO2Data

gcappon commented 1 year ago

Dear @Alejandroem, thanks for spotting this bug. I will try to solve it ASAP.

fraca98 commented 1 year ago

It also happens when you get FitbitSpO2Data

I'm also working on this to solve some problems related to spO2 data and Heart rate intraday data. I'll submit a PR as soon as i can

EDIT You can check my PR #12

gcappon commented 1 year ago

Thank you @fraca98! I merged the PR, it should fix the issue.