getNumByValueStr static method
The parameter fractionDigits
must be an integer satisfying: 0 <= fractionDigits <= 20
.
Implementation
static num? getNumByValueStr(String valueStr, {int? fractionDigits}) {
double? value = double.tryParse(valueStr);
return fractionDigits == null
? value
: getNumByValueDouble(value, fractionDigits);
}