parseStringToDouble static method

double parseStringToDouble(
  1. String? value
)

Implementation

static double parseStringToDouble(String? value) {
  var isNumber = onlyNumbers(value);
  if (isNumber.isEmpty || value == null || value.isEmpty) {
    return 0.0;
  }
  value = value.replaceAll('.', '').replaceAll(',', '.');
  return double.parse(value);
}