ceil method

int? ceil()

Returns the least integer that is not smaller than this number.

Rounds the number towards infinity.

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

print(Obj(1.99999).ceil()); // 2
print(Obj(2.0).ceil()); // 2
print(Obj(2.00001).ceil()); // 3
print(Obj(-1.99999).ceil()); // -1
print(Obj(-2.0).ceil()); // -2
print(Obj(-2.00001).ceil()); // -2

Implementation

int? ceil() => value?.ceil();