numeric method
Returns double 0.564 from string percentage like "56.4%"
Parse source as a double literal and return its value.
Implementation
double? numeric() {
if (this == null) {
return null;
}
if (_percentageRegex.hasMatch(this!)) {
return double.parse(this!.substring(0, this!.length - 1)) / 100;
}
return double.tryParse(this!);
}