Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to round up a double value in flutter

Tags:

dart

Is there anyway to round up a double value?

I want result always rounded up.

int offSet = (totalRecords / 10).round();
like image 947
Naeem Avatar asked Feb 18 '20 14:02

Naeem


1 Answers

It's ceil:

Returns the least integer no smaller than this.

int offSet = (totalRecords / 10).ceil();
like image 155
bereal Avatar answered Oct 18 '22 22:10

bereal