parse static method

CSSURL? parse(
  1. String? url
)

Implementation

static CSSURL? parse(String? url) {
  if (url == null) return null;
  url = url.trim();
  if (url.isEmpty) return null;

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

  var uri = match.group(1) ?? match.group(2) ?? match.group(3);

  return CSSURL(uri);
}