view library

Mustache template views

Classes

View
View class for rendering mustache templates

Functions

jsonResponse(Map<String, dynamic> data, {int status = 200}) → Response
JSON response helper
render(View view, {int status = 200}) → Response
Helper function to create a View and render to Shelf Response
textResponse(String text, {int status = 200}) → Response
Text response helper
viewResponse(String template, {required Map<String, dynamic> data, String? layout, int status = 200}) → Response
Helper function for HTTP kernel integration

Exceptions / Errors

TemplateNotFoundException
Exception for template not found