renderWidget method
Renders a widget-based view for the current request.
This method handles the rendering of template-based responses using the configured view system. The widget is typically an HTML template that can include dynamic content and template engine features.
uri The path to the widget/template file to render, relative to the
configured views directory. The file should be a valid template supported
by the view engine (e.g., HTML, Jinja2, etc.).
The rendered content is automatically sent as the HTTP response with appropriate content-type headers.
Implementation
void renderWidget(String uri) {
rq.renderView(
path: uri,
);
}