getRoundedValue function

double getRoundedValue(
  1. double value,
  2. int precision
)

Implementation

double getRoundedValue(double value, int precision) {
  return double.parse(value.toStringAsFixed(precision));
}