round method Null safety

  1. @override
Value round(
  1. Value v
)
override

Implementation

@override
Value round(Value v) {
  final d = double.parse(v.asDouble.toStringAsExponential(fractionDigits));
  if (d >= 1e100 || d <= -1e100) {
    return v;
  }
  return Value.fromDouble(d);
}