compileProtoFile function

Future<bool> compileProtoFile({
  1. required String protoFile,
  2. required String outPutPath,
  3. String workingDirectory = '',
})

Implementation

Future<bool> compileProtoFile({
  required String protoFile,
  required String outPutPath,
  String workingDirectory = '',
}) async {
  return await executeCommand(
    verbose: true,
    command: 'protoc --dart_out=grpc:$outPutPath -Iprotos $protoFile',
    workingDirectory: workingDirectory,
    throwOnError: true,
  );
}