parse static method

CSSBorder? parse(
  1. String? value
)

Implementation

static CSSBorder? parse(String? value) {
  if (value == null) return null;

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

  var sizeStr = match.group(1);
  var styleStr = match.group(2);
  var colorStr = match.group(3);

  var size = CSSLength.parse(sizeStr);
  var style = parseCSSBorderStyle(styleStr);
  var color = CSSColor.parse(colorStr);

  return CSSBorder(size, style, color);
}