parseCssRuleTextProperties function

String parseCssRuleTextProperties(
  1. String? cssRuleText
)

Returns a list of properties of the CssRule text.

Implementation

String parseCssRuleTextProperties(String? cssRuleText) {
  if (cssRuleText == null || cssRuleText.isEmpty) return '';
  var idx1 = cssRuleText.indexOf('{');
  if (idx1 < 0) return '';
  var idx2 = cssRuleText.lastIndexOf('}');
  var properties = cssRuleText.substring(idx1 + 1, idx2).trim();
  return properties;
}