fixedDecimais function

double fixedDecimais({
  1. required dynamic value,
  2. required int decimalPlaces,
})

Fixed decimals and return the double value If the input value is a string or int, convert it to double before

Implementation

double fixedDecimais({required dynamic value, required int decimalPlaces}) {
  var parsedValue = toDouble(value);
  return toDouble(parsedValue.toStringAsFixed(decimalPlaces));
}