render method
Renders a template file with the given context.
Implementation
Future<String> render(
String templatePath, Map<String, dynamic> context) async {
String template = await File(templatePath).readAsString();
template = await _processInheritance(template, context);
template = _processLoops(template, context);
template = _processConditionals(template, context);
context.forEach((key, value) {
template = template.replaceAll('{{ $key }}', value.toString());
});
return template;
}