Future render(String view, [Map data])

Renders a view to the response stream, and closes the response.

Source

Future render(String view, [Map data]) async {
  write(await app.viewGenerator(view, data));
  header(HttpHeaders.CONTENT_TYPE, ContentType.HTML.toString());
  end();
}