parse static method

CSSMax? parse(
  1. String? s
)
override

Implementation

static CSSMax? parse(String? s) {
  if (s == null) return null;
  s = s.trim().toLowerCase();
  if (s.isEmpty) return null;

  var match = pattern.firstMatch(s);
  if (match == null) return null;

  var call = match.group(1)!;

  var args = call.split(patternArgsDelimiter);
  args = _normalizeArgs(args);

  if (args.isNotEmpty) {
    return CSSMax(args);
  }

  return null;
}