parse static method
Implementation
static CSSNumber? parse(String? value) {
if (value == null) return null;
var match = pattern.firstMatch(value);
if (match == null) return null;
var nStr = match.group(1);
num? n;
if (isInt(nStr)) {
n = parseInt(nStr);
} else if (isDouble(nStr)) {
n = parseDouble(nStr);
} else {
return null;
}
return CSSNumber(n);
}