better_protoc_plugin 1.2.2 copy "better_protoc_plugin: ^1.2.2" to clipboard
better_protoc_plugin: ^1.2.2 copied to clipboard

An opinionated, "new and improved" protobuf protoc compiler plugin used to generate Dart code with real Dart enums, message interfaces, automatic DateTime/Duration conversion, etc.

Use this package as an executable

Install it

You can install the package from the command line:

dart pub global activate better_protoc_plugin

Use it

The package has the following executables:

$ protoc-gen-dart

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add better_protoc_plugin

With Flutter:

 $ flutter pub add better_protoc_plugin

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  better_protoc_plugin: ^1.2.2

Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:better_protoc_plugin/bazel.dart';
import 'package:better_protoc_plugin/const_generator.dart';
import 'package:better_protoc_plugin/indenting_writer.dart';
import 'package:better_protoc_plugin/mixins.dart';
import 'package:better_protoc_plugin/names.dart';
import 'package:better_protoc_plugin/protoc.dart';
import 'package:better_protoc_plugin/recase.dart';
import 'package:better_protoc_plugin/string_escape.dart';
import 'package:better_protoc_plugin/testing/mixins.dart';
1
likes
140
pub points
0%
popularity

Publisher

verified publisherdra11y.com

An opinionated, "new and improved" protobuf protoc compiler plugin used to generate Dart code with real Dart enums, message interfaces, automatic DateTime/Duration conversion, etc.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

collection, fixnum, path, protobuf

More

Packages that depend on better_protoc_plugin