round method

Expr round({
  1. int decimals = 0,
  2. RoundMode mode = RoundMode.halfToEven,
})

Implementation

Expr round({int decimals = 0, RoundMode mode = RoundMode.halfToEven}) {
  if (decimals < 0 || decimals > 0xffffffff) {
    throw RangeError.range(decimals, 0, 0xffffffff, 'decimals');
  }
  return _function(
    'round',
    options: {'decimals': decimals, 'mode': mode.wireName},
  );
}