In this guide, we will discuss floor Method in Dart Programming Language. This method returns the largest integer less than or equal to a number.
Syntax
Number.floor()
Return Value
Returns the largest integer less than or equal to a number x.
Example
void main() { var a = 2.9; print("The floor value of 2.9 = ${a.floor()}"); }
It will produce the following output −.
The floor value of 2.9 = 2
Next Topic : Click Here
Pingback: Dart Programming - compareTo Method | Adglob Infosystem Pvt Ltd
Pingback: Dart Programming - Numbers | Adglob Infosystem Pvt Ltd