The following code outputs the following results:
double firstValue = 1.2;
print('type of firstValue: ${firstValue.runtimeType}'); // double
double secondValue = 1;
print('type of secondValue: ${secondValue.runtimeType}'); // int
print('type of secondValue parsed: ${secondValue.toDouble().runtimeType}'); // int
Why a declared double value is understood like an int value? Even when I do an explicit cast, the the 1 value is still an int.
Why does this happen?