readTemplateFile method
Reads template file
Implementation
Future<String> readTemplateFile(String filename) async {
final filepath = p.join(templatesDirectoryPath, filename);
final file = File(filepath);
if (!file.existsSync()) {
throw GenerateTemplatesUnreachableException(
'cannot find template file "$filepath"',
);
}
return file.readAsString();
}