double roundDouble(double value, int places) { assert(places > 0, 'Parameter places has to be larger than 0'); double mod = pow(10.0, places) as double; return ((value * mod).round().toDouble() / mod); }