parseFloat static method
Parses value as a double, locale-aware. Returns null on failure.
Implementation
static double? parseFloat(String value, {String? locale}) {
try {
return NumberFormat.decimalPattern(
locale ?? _defaultLocale,
).parse(value).toDouble();
} catch (_) {
return null;
}
}