@override void renderTree(Canvas canvas) { if (parent != null) { render(canvas); } for (final component in children) { component.renderTree(canvas); } }