In this guide, we will discuss round Method in Dart Programming Language. This method returns the value of a number rounded to the nearest integer.
Syntax
Number.round()
Return Value
Returns the value of a number rounded to the nearest integer.
Example
void main() { double n1 = 12.023; double n2 = 12.89; var value = n1.round(); print( value ); value = n2.round(); print( value ); }
It will produce the following output −.
12 13
Next Topic : Click Here
Pingback: Dart Programming - remainder Method | Adglob Infosystem Pvt Ltd
Pingback: Dart Programming - Numbers | Adglob Infosystem Pvt Ltd