setInnerHtml method Null safety

void setInnerHtml (
  1. String? html,
  2. {NodeValidator? validator,
  3. NodeTreeSanitizer? treeSanitizer}
)

Implementation

void setInnerHtml(String? html,
    {NodeValidator? validator, NodeTreeSanitizer? treeSanitizer}) {
  this.nodes.clear();
  append(document.body!.createFragment(html,
      validator: validator, treeSanitizer: treeSanitizer));
}