renderHtml method

Future<String> renderHtml({
  1. required String html,
  2. int status = 200,
})

Renders an HTML response.

Calls renderString with the ContentType.html to render the provided HTML content.

html - The HTML content to be rendered. status - The HTTP status code to be set for the response. Default is 200.

Returns a Future<String> containing the rendered HTML.

Implementation

Future<String> renderHtml({
  required String html,
  int status = 200,
}) async {
  return renderString(
    text: html,
    status: status,
    contentType: ContentType.html,
  );
}