parseValue static method

num? parseValue(
  1. String? text
)

Implementation

static num? parseValue(String? text) {
  if (text == null) return null;
  final cleanStr = text.replaceAll(RegExp(r'[^\d.]'), '');
  return num.tryParse(cleanStr) ?? 0;
}