render method

Future<String> render(
  1. String viewName, {
  2. Map<String, dynamic> context = const {},
  3. bool escapeOutput = true,
})

Implementation

Future<String> render(
  String viewName, {
  Map<String, dynamic> context = const {},
  bool escapeOutput = true,
}) async {
  final template = await _loadTemplate(viewName);
  final processedTemplate = await _applyDirectives(template, context);
  return _renderExpressions(processedTemplate, context, escapeOutput);
}