HtmlRender class

The HtmlRender class is responsible for rendering HTML content using a specified template and data. It implements the Render interface.

Implemented types

Constructors

HtmlRender({String? templateName, String? content, required Map<String, dynamic> data, required ViewEngine engine})
Constructs an instance of HtmlRender.

Properties

content String?
The content of the template to be used for rendering.
final
data Map<String, dynamic>
The data to be passed to the template for rendering.
final
engine ViewEngine
The template engine used to render the HTML content.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
templateName String?
The name of the template to be used for rendering.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(Response response) Future<void>
Renders the HTML content and writes it to the response.
override
toString() String
A string representation of this object.
inherited
writeContentType(Response response) → void
Sets the content type of the response to 'text/html; charset=utf-8'.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited