Check out example codes for "remove .0 flutter". It will help you in understanding the concepts better.

Code Example 1

val.toInt()

Learn ReactJs, React Native from akashmittal.com