attachTo method
Attach a renderObject to parent.
Implementation
@override
void attachTo(Element parent, { RenderBox? after }) {
// Empty string of TextNode should not attach to render tree.
if (_data.isEmpty) return;
createRenderer();
if (parent.renderBoxModel is RenderLayoutBox) {
RenderLayoutBox parentRenderLayoutBox = parent.renderBoxModel as RenderLayoutBox;
parentRenderLayoutBox = parentRenderLayoutBox.renderScrollingContent ?? parentRenderLayoutBox;
parentRenderLayoutBox.insert(_renderTextBox!, after: after);
_applyTextStyle();
}
}