Closed andro951 closed 6 days ago
Hello!
I was unable to replicate the issue on my end, so it’s possible I may have missed something. To assist further, I’m sharing a public project link at the end of this message that you can clone. It contains the SQLite file, which you can modify and test to see if you can replicate the behavior.
Steps I followed:
real1
and real2
, both as DOUBLE).Here’s the project link: Project Link
Closing this issue since we haven't heard back from you. If you are still facing the problem please submit a new issue. Have a great day!
Thanks for looking into this. I tried out the test project you posted and tried to reproduce the issue with it and my project, but couldn't reproduce the problem. I was eventually able to get it to work with my database as well. I'm not positive what the problem was. I think it's possible that the database wasn't being updated when I changed it and used a new APK to update the app. I started uninstalling the app to make sure the database was up to date, and that seemed to help, but I haven't done a test to show for sure if that's the case. If I can nail it down to that, I'll make a new issue request.
Can we access your project?
Current Behavior
I'm using an SQLite database I made in a FlutterFlow project. I made a Read Query with an output column: WateringFrequencyInDays which is marked as a double. In the SQLite database, the WateringFrequencyInDays column is a REAL. When the value is something like 3.5, it works as expected, and the Query is usable resulting in the value 3.5 as a double. However, if the value is a whole number like 3, the app's page goes blank gray because it isn't converting to double. If I change the output column type to int when the value is 3, it will work correctly. This is very clearly not how it should work since in a REAL column, there can be values with or without decimals and it should be able to cast either of them to a double.
Expected Behavior
Be able to cast values from a REAL column that are whole numbers to a double.
Steps to Reproduce
Create a SQLite database with 2 entries. It should have 1 REAL column. One row should have a whole number like 3, and the other row should have decimal number like 3.5. Create a Read query that marks the return type as double, and make a text widget to display the 3.5 value. Next, make a text widget to display the 3 value still as a double.
Reproducible from Blank
Bug Report Code (Required)
IT43hs7ZuLl6sbhb7c2MbvoypGQnGlgJWq8vkNlRaDYvCIyqOph/eeOlXxduTe2+S3lhHFqgil0y7sGMuPL9KPQpGwuZRZxg+s9IczrNd3q8Sr6qDMyRPnFPN+JRIFSs0MCRmSYkIvFhci0m7zqmAtmuTjPYCZ+/Zwh9f6PHaOI=
Visual documentation
MinPH column is a REAL column. values like 5.5 will successfully cast to double where 6 won't.
Environment
Additional Information
No response