apply method

  1. @override
void apply(
  1. MarkupRenderObject root
)
override

Implementation

@override
void apply(MarkupRenderObject root) {
  var html = root.children.findWhere((c) => c.tag == 'html')?.node ?? root;
  var head = html.children.findWhere((c) => c.tag == 'head')?.node;

  if (head == null) {
    html.children.insertAfter(head = html.createChildRenderObject()..tag = 'head');
  }

  applyHead(head);
}