Response.View constructor

Response.View(
  1. String templateString, {
  2. int statusCode = HttpStatus.ok,
  3. Map<String, dynamic> varMap = const {},
})

Render a template from a template string. Templates can be inlined or looked up from a template

Implementation

Response.View(String templateString,
    {this.statusCode = HttpStatus.ok,
    Map<String, dynamic> varMap = const {}}) {
  final template = Template(templateString);
  body = template.renderString(varMap);
}