Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.
/ proto_builder Public archive

Converts Protobuf files to Dart files for gRPC.

Notifications You must be signed in to change notification settings

EFA-dev/proto_builder

Repository files navigation

What does it do?

This package will find the .proto files contained in your project(lib folder) and convert them into Dart files for gRPC.
It uses protoc_plugin (Thanks) to do this.


How to use?

You can use the package in two different ways.

Direct start

You can run the package directly. When it is run in this way, the process is completed faster.
Your .proto files can be found in any folder within the project.

pub run proto_builder:main

Using with build_runner

The process takes a little longer if you use it with the build_runner package. But I added this support anyway.
Your .proto file must be in lib folder.

pub run build_runner build --verbose


Output Settings

You can set it from the pubspec.yaml file to save the generated files wherever you want. If you wish, you can save it in separate folders according to the .proto files. To make these settings, simply add the following codes to your pubspec.yaml file. The files created are saved in the lib/grpc/src/ folder by default.

proto_builder:
  outputPath: lib/grpc/generated
  seperateFolder: true

About

Converts Protobuf files to Dart files for gRPC.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages