toDouble function

double toDouble(
  1. Object value, {
  2. double defaultValue = defaultDouble,
})

Parse to double or returns defaultValue

Implementation

double toDouble(
  Object value, {
  double defaultValue = defaultDouble,
}) {
  double number = defaultDouble;
  try {
    number = double.parse('$value');
  } on Exception catch (e, s) {
    errorLogsNS("toDouble", e, s);
  }
  return number;
}