Parses a formatted string back to a numeric value.
static num? parse(String text) { if (text.isEmpty) return null; final clean = text.replaceAll(',', ''); return num.tryParse(clean); }