allowInlineStyles method Null safety

void allowInlineStyles (
  1. {String? tagName}
)

Allow inline styles on elements.

If tagName is not specified then this allows inline styles on all elements. Otherwise tagName limits the styles to the specified elements.

Implementation

void allowInlineStyles({String? tagName}) {
  if (tagName == null) {
    tagName = '*';
  } else {
    tagName = tagName.toUpperCase();
  }
  add(new _SimpleNodeValidator(null, allowedAttributes: ['$tagName::style']));
}