In this guide, we will discuss toDouble Method in Dart Programming Language. This method returns the double representation of the number’s value.
Syntax
Number.toDouble()
Return Value
Returns a double representing the specified Number object.
Example
oid main() { int n1 = 2; var value = n1.toDouble(); print("Output = ${value}"); }
It will produce the following output −.
Output = 2.0
Next Topic : Click Here
Pingback: Dart Programming - round Method | Adglob Infosystem Pvt Ltd
Pingback: Dart Programming - Numbers | Adglob Infosystem Pvt Ltd