flutter/dart中实现四舍五入更加面向对象一些,具体的实现方式如下:
var foo = 6.28; print(foo.round()); // 6 var bar = -6.5; print(bar.round()); // -7