roundToNDecimals function
Round a double input aArrondir
to nbDecimales
decimals (if not provided, 2 decimals)
Implementation
double roundToNDecimals(double aArrondir, {int nbDecimales = 2}) {
var tempValue = (aArrondir * math.pow(10, nbDecimales.toDouble())).round();
return tempValue / math.pow(10, nbDecimales.toDouble());
}