simpleTemplateToFileMap method
Maps every template to a filename in a simple way
Maps template name with file's name replacing filename
string with fileNameBase
parameter
All files will be located at the same targetDirectory
Implementation
Map<String, File> simpleTemplateToFileMap(
Directory targetDirectory,
String fileNameBase,
) {
final files = <String, File>{};
for (final templateName in templateNames) {
files[templateName] = File(
p.join(
targetDirectory.path,
templateToFilenameMap[templateName]!
.replaceAll('filename', fileNameBase),
),
);
}
return files;
}