outputPathFor method
Returns the path where the .pb.dart file will be placed.
The input is a .proto file and the output is a path under the output folder.
Implementation
@override
Uri outputPathFor(Uri inputPath, String extension) {
var pkg = _findPackage(inputPath.path);
if (pkg == null) {
throw ArgumentError('Unable to locate package for input $inputPath.');
}
// Bazel package-relative paths.
var relativeInput = inputPath.path.substring('${pkg.inputRoot}/'.length);
var base = p.withoutExtension(relativeInput);
var outputPath = p.join(pkg.outputRoot, '$base$extension');
return Uri.file(outputPath);
}