parsePercentage static method
Implementation
static double? parsePercentage(String value) {
if (_cachedParsedPercentage.containsKey(value)) {
return _cachedParsedPercentage[value];
}
double? parsed;
if (value.endsWith(PERCENTAGE)) {
parsed = double.tryParse(value.split(PERCENTAGE)[0])! / 100;
}
return _cachedParsedPercentage[value] = parsed;
}