protoc_plugin 21.1.2 copy "protoc_plugin: ^21.1.2" to clipboard
protoc_plugin: ^21.1.2 copied to clipboard

A protobuf protoc compiler plugin used to generate Dart code.

Use this package as an executable

Install it

You can install the package from the command line:

dart pub global activate protoc_plugin
copied to clipboard

Use it

The package has the following executables:

$ protoc-gen-dart
copied to clipboard

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add protoc_plugin
copied to clipboard

With Flutter:

 $ flutter pub add protoc_plugin
copied to clipboard

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

dependencies:
  protoc_plugin: ^21.1.2
copied to clipboard

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:protoc_plugin/bazel.dart';
import 'package:protoc_plugin/const_generator.dart';
import 'package:protoc_plugin/indenting_writer.dart';
import 'package:protoc_plugin/mixins.dart';
import 'package:protoc_plugin/names.dart';
import 'package:protoc_plugin/protoc.dart';
import 'package:protoc_plugin/string_escape.dart';
import 'package:protoc_plugin/testing/mixins.dart';
copied to clipboard
85
likes
140
points
163k
downloads

Publisher

verified publishergoogle.dev

Weekly Downloads

2024.07.31 - 2025.02.12

A protobuf protoc compiler plugin used to generate Dart code.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

fixnum, path, protobuf

More

Packages that depend on protoc_plugin