roundDouble static method

double roundDouble(
  1. double value,
  2. int places
)

Implementation

static double roundDouble(double value, int places) {
  num mod = pow(10.0, places);
  return ((value * mod).round().toDouble() / mod);
}