Hide PbList and PbMap constructors (#1072)
`PbList` and `PbMap` can't be constructed by the users properly, because the
constructor arguments are private:
- `PbList` element check function
- `PbMap` key and value field type arguments
Internally we had just one `PbMap` constructor call (with random field type
arguments) which we replaced with `{}`, and a few `PbList` constructor calls
(without a check function) which we replaced with `[]`.
To prevent confusion and incorrect uses of these types, hide the constructors.
Some of the `PbList` element validation tests are removed: they would need to
be moved to `protoc_plugin/test` as we no longer have access to `PbList`
constructors (but we can get `PbList`s from messages), but the tests are also
duplicates of the tests in `protoc_plugin/test/validate_fail_test.dart`. So
removed them instead.Protocol Buffers (protobuf) are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.
This repository is home to packages related to protobuf support for Dart.
| Package | Description | Published Version |
|---|---|---|
| protobuf | Runtime library for protocol buffers support. | |
| protoc_plugin | A protobuf protoc compiler plugin used to generate Dart code. | |
| benchmarks | Benchmarks for various protobuf functions. |
For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.