truncate method Null safety

int truncate ()
override

Returns the integer obtained by discarding any fractional part of this number.

Rounds the number towards zero.

Throws an UnsupportedError if this number is not finite (NaN or an infinity), .

Implementation

int truncate();