I want to use doubles in my code but Dart converts them to ints (or dynamic).
I have tried to cast them using 'as' or .toDouble() but they do not stay as doubles:
(in dartpad)
main() {
print ((1.0 as double).runtimeType);
print (1.0.toDouble().runtimeType);
}
(output)
int
int
I would have expected the output of these statements to be 'double'. If I change the value to 1.1 I get a double out.