doubles being read as integers when passing a whole number or a zero

Hey everyone... here's the problem:

I'm using Xano as my backend. In my database I have a series of numbers. These numbers are generated through various calculations. The nature of these calculations are such that they most often result in decimals as they are imperfect numbers. So naturally, when I pass these numbers to FlutterFlow I set up the variable data type as 'double' since I need to allow for up to two decimals. The problem comes when the number being passed from Xano happens to be a whole number or even a zero. Xano stores these numbers as integers (regardless of what the set data type is) and the result is a data type error in FlutterFlow:

Simulator Screenshot - iPhone 14 Pro - 2023-08-29 at 17.15.29.png
308.79KB

I can't imagine I am the first to encounter this issue so I expect there is a fix but I can't seem to figure it out. How does one set up a data variable that could be either an integer or a double? FlutterFlow seems to require that you dictate one or the other even before you are able to process the data through a code expression.

I don't know how to resolve this. Please help!

6 replies