createRenderSVG method

  1. @override
RenderBoxModel createRenderSVG({
  1. RenderBoxModel? previous,
  2. bool isRepaintBoundary = false,
})
override

Implementation

@override
RenderBoxModel createRenderSVG({RenderBoxModel? previous, bool isRepaintBoundary = false}) {
  RenderSVGRoot root = RenderSVGRoot(renderStyle: renderStyle)..viewBox = viewBox..ratio = ratio;

  if (previous is RenderSVGRoot) {
    List<RenderBox> children = previous.getChildren();
    previous.removeAll();
    root.addAll(children);
  }

  return root;
}