toFloatWithDefault static method

double toFloatWithDefault(
  1. dynamic value,
  2. double defaultValue
)

Converts value into float or returns default when conversion is not possible.

  • value the value to convert.
  • defaultValue the default value. Returns float value or default value when conversion is not supported.

See DoubleConverter.toDoubleWithDefault See DoubleConverter.toNullableDouble

Implementation

static double toFloatWithDefault(value, double defaultValue) {
  return DoubleConverter.toDoubleWithDefault(value, defaultValue);
}