Double in table returned as INT

I have an element defined in my Backendless table as DOUBLE, but when retrieving it by findById, I get an error from the reflectable that the value is an int and can’t be a double. It is true that the values are all whole numbers, but why doesn’t it think that 11.0 is a double?

Could you please clarify where exactly you get the error?

In main.reflectable.dart, on a line that looks like this:

r’height=': (dynamic instance, value) => instance.height = value,

I get the exception:

type ‘int’ is not a subtype of type ‘double?’ of ‘value’

The table has the field “height” as a DOUBLE. I have declared the member variable in my class as double.

Do you use the Backendless Flutter SDK to communicate with the backend?

Yes, I do.

By the way, I have worked around this issue by declaring the member variable as an int in my class. I just wondered what was going on.

Thank you for the info. We will try reproducing the error and let you know about our findings.

Regards,
Mark

1 Like

Hello, @daniel-eckhart.

Which one version of backendless-sdk are you using?

Regards, Nikita.

7.2.3

Can you try with latest verion of backendless-sdk?

I am using 7.3.7 and still getting the same error.

Hi @daniel-eckhart,

We are looking for the cause of your problem. We will notify you as soon as we find the cause of the problem.

Regards,
Bohdan

Hello, @daniel-eckhart.

Soon this version of SDK will not be supported. I recommend writing your applications on version 8.0.0-alpha.24 and testing at same version.

Soon this version will be in main thread(now prerelease).

Regards, Nikita.