insertRule method

dynamic insertRule(
  1. String text,
  2. int index
)

Implementation

insertRule(String text, int index) {
  CSSRule? rule = CSSParser.parseRule(text);
  if (rule != null) {
    cssRules.insert(index, rule);
  } else {
    // TODO: throw error
  }
}