There seems to be some inconsistency with the way tryParse is used in Dart or I'm going about it a silly way, likely the latter.
When we use the int.tryParse statement, if we pass it 10.0 as a double, we would expect to get 10 which we do.
print(int.tryParse(10.0.toString())); ==> 10
If we pass it 10.0 as a string, it will return null.
print(int.tryParse('10.0')); ==> null
I find this a bit strange as I would have thought 10.0.toString() is equivalent to '10.0'. Does anyone have an explanation?