getTemplatePath method
Gets the path to the template file requested.
Implementation
File? getTemplatePath(String templateName, {Directory? templatesDir}) {
final Directory templateDir =
templatesDir ?? configuration.templatesDirectory;
final File templateFile = configuration.filesystem
.file(path.join(templateDir.path, '$templateName.tmpl'));
return templateFile.existsSync() ? templateFile : null;
}