| commit | cafeac4208a1139e370099591edc8b014dfcc204 | [log] [tgz] |
|---|---|---|
| author | Ömer Sinan Ağacan <omersa@google.com> | Mon Nov 24 11:51:43 2025 +0000 |
| committer | GitHub <noreply@github.com> | Mon Nov 24 11:51:43 2025 +0000 |
| tree | 69fe2cfc4f6069b3c7cce8b046409b48b9b4bd07 | |
| parent | 7fcd48b24b92671f59b36a7b3ce23208f5600b7c [diff] |
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.