render method

Future<String> render(
  1. String templateName, [
  2. Map<String, dynamic>? data
])

Renders a template with the provided data asynchronously.

Implementation

Future<String> render(String templateName, [Map<String, dynamic>? data]) async {
  final templateContent = await _loadTemplate(templateName);
  return _compile(templateContent, data ?? {});
}