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.
8 files changed
tree: 69fe2cfc4f6069b3c7cce8b046409b48b9b4bd07
  1. .github/
  2. benchmarks/
  3. protobuf/
  4. protoc_plugin/
  5. tool/
  6. .gitignore
  7. analysis_options.yaml
  8. AUTHORS
  9. LICENSE
  10. pubspec.yaml
  11. README.md
README.md

Protobuf support for Dart

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.

PackageDescriptionPublished Version
protobufRuntime library for protocol buffers support.pub package
protoc_pluginA protobuf protoc compiler plugin used to generate Dart code.pub package
benchmarksBenchmarks for various protobuf functions.

Publishing automation

For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.