getAsFloatWithDefault method

double getAsFloatWithDefault(
  1. String key,
  2. double defaultValue
)

Converts map element into a flot or returns default value if conversion is not possible.

  • key a key of element to get.
  • defaultValue the default value Returns flot value of the element or default value if conversion is not supported.

See FloatConverter.toFloatWithDefault

Implementation

double getAsFloatWithDefault(String key, double defaultValue) {
  var value = get(key);
  return FloatConverter.toFloatWithDefault(value, defaultValue);
}