如何在颤振中舍入双值

Nae*_*eem 5 dart

无论如何要舍入双值?

我希望结果总是四舍五入。

int offSet = (totalRecords / 10).round();
Run Code Online (Sandbox Code Playgroud)

ber*_*eal 10

它是ceil

返回不小于此的最小整数。

int offSet = (totalRecords / 10).ceil();
Run Code Online (Sandbox Code Playgroud)