apply method
Called once all adapters are prepared, to change the markup of root.
Implementation
@override
void apply(MarkupRenderObject root) {
final html = root.children.findWhere<MarkupRenderElement>((c) => c.tag == 'html') ?? root;
var head = html.children.findWhere<MarkupRenderElement>((c) => c.tag == 'head');
bool needsInsert = false;
if (head == null) {
head = html.createChildRenderElement('head');
needsInsert = true;
}
final didApply = applyHead(head);
if (didApply && needsInsert) {
html.children.insertAfter(head);
}
}