resolve method
Resolves the given relative path to a Source object.
This method normalizes the relative path, checks if the file exists,
reads its content, and returns a Source object containing the file's URI
and content.
Throws an exception if the file does not exist.
Implementation
@override
Source resolve(String relPath) {
final file = fileSystem.file(_resolvePath(relPath));
if (!file.existsSync()) {
throw Exception('Template file not found: $relPath');
}
final content = file.readAsStringSync();
return Source(file.uri, content, this);
}