dart_code_gen 1.9.0
dart_code_gen: ^1.9.0 copied to clipboard
A command-line tool which generates Dart code for Protobuf type registries.
Dart Code Generator #
A command-line tool which generates Dart code for Protobuf type registries.
Usage #
The generator accepts several command-line arguments:
- Required option
--descriptorspecifies the path to a file which contains agoogle.protobuf.FileDescriptorSet. The descriptor set contains all the Protobuf types for which the tool must generate code. - Required option
--destinationspecifies the path to the file into which the code must be written. If the file does not exist, it is created. - Option
--standard-typesspecifies a Dart package which contains standard Protobuf types. The default value of this option isspine_client. The package should contain types:- declared in the
google.protobuf.*package; - declared in the base module in Spine.
- declared in the
- Option
--import-prefixspecifies the path prefix for.pb.dartfiles generated for types listed in thedescriptor. Defaults to an empty path, implying that the generated files are located in the same directory as thedestination. - Flag
--stdoutmakes the tool print the output Dart code into the standard output stream, as well as writing it into thedestinationfile. - Flag
--no-stdoutensures that the tool does not print Dart code into the standard output stream. This is the default behaviour. - Flag
--help(or-hfor short), makes the tool print a brief usage guide. When called with this flag, all the other flags are ignored.