NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #246 most downloaded on pub.dev
Runtime library for protocol buffers support. Use with package:protoc_plugin to generate Dart code for your '.proto' files.
Last release 27 days ago
11 Sep 2026
Release timing varies
gaps range from 3 weeks to 1.6 years
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
95 releases · first in 2013
Make BuilderInfo methods accept GeneratedMessage Function() typed closures.
BuilderInfo methods accept GeneratedMessage Function() typedBuilderInfo.add accept nullable name (for tree shaking purposes).dart.library.html conditional import.New GeneratedMessage extension methods toTextFormat and writeTextFormat added to convert the message into the official protocol buffers text format .
New GeneratedMessage extension methods toTextFormat and writeTextFormat added to convert the message into the official protocol buffers text format. (#1080, #125)
Add well-known proto types as libraries. This change is required for protoc_plugin-25.0.0. (#1081)
Breaking: Hide PbList and PbMap constructors. It is not possible to construct these values correctly in user code, so the constructors are now private. Existing uses of PbList can be replaced by List and PbMap can be replaced by Map.
For immutable lists and maps, you can use built_value. (#1072)
Map fields now check key and value validity when adding elements. (#1065, #1076)
One column per quarter.
New GeneratedMessage extension methods toTextFormat and writeTextFormat
added to convert the message into the official protocol buffers text
format. (#1080, #125)
Add well-known proto types as libraries. This change is required for protoc_plugin-25.0.0. (#1081)
Breaking: Hide PbList and PbMap constructors. It is not possible to
construct these values correctly in user code, so the constructors are now
private. Existing uses of PbList can be replaced by List and PbMap can
be replaced by Map.
For immutable lists and maps, you can use built_value. (#1072)
Map fields now check key and value validity when adding elements. (#1065, #1076)
Update default size limit of CodedBufferReader from 67,108,864 bytes to 2,147,483,647 bytes, and default recursion limit from 64 to 100.
Update default size limit of CodedBufferReader from 67,108,864 bytes to 2,147,483,647 bytes, and default recursion limit from 64 to 100.
The new limits are consistent with the Java and C++ implementations. (#1060)
Fix GeneratedMessage.addExtension returning non-frozen and GeneratedMessage.getExtension allowing modifying an extension when the message is frozen before initializing the extension field set. (#1062)
Fix GeneratedMessage.getExtension returning differently typed lists when the message extension field set is initialized and frozen and initialized but not frozen. (#1062)
Fix PbList methods addAll, insertAll, replaceRange, setAll, setRange iterating the Iterable argument twice. (#730, #1070)
Fix GeneratedMessage.== throwing a type error when comparing map fields in some cases. (#1075, #1077)
This bug was introduced with protobuf-5.0.0.
Improve performance of GeneratedMessage.deepCopy .
GeneratedMessage.deepCopy. (#742)GeneratedMessage.mergeFromProto3Json when the ignoreUnknownFields optional argument is true. (#853)BuilderInfo methods to support protoc-plugin 23.0.0. (#1047)PbList.from from List<T> to Iterable<T>. (#1054)GeneratedMessage.clear. (#1057)GeneratedMessage methods mergeFromJson, mergeFromJsonMap, writeToJson, writeToJsonMap. (#1058)GeneratedMessage.deepCopy. (#742)GeneratedMessage.mergeFromProto3Json when
the ignoreUnknownFields optional argument is true. (#853)BuilderInfo methods to support protoc-plugin 23.0.0. (#1047)PbList.from from List<T> to Iterable<T>.
(#1054)GeneratedMessage.clear. (#1057)GeneratedMessage methods
mergeFromJson, mergeFromJsonMap, writeToJson, writeToJsonMap.
(#1058)Release protobuf 4.2.0
Release protobuf 4.2.0 (#1038)
Internal refactoring to split the package into libraries. This allows conditionally importing different libraries and improving performance by using different encoding/decoding libraries based on the target platform. (#1026)
Some of the private PbFieldType members are made public, to allow using
them in internal libraries. This type is for internal use only. (#1027)
Improve performance of GeneratedMessage members: writeToJsonMap,
writeToJson, mergeFromJson, mergeFromJsonMap. (#1028)
Remove BuilderInfo.fromProto3Json and BuilderInfo.toProto3Json as a part
of an internal refactoring.
Minimum SDK dependency bumped from 3.6.0 to 3.7.0. ([ #1024 ]) [ #1024 ]: #1024
Improve packed field decoding performance. ([#959], [#981])
Breaking: The following types and members are now removed:
Breaking: The following types and members are now removed:
PbEventMixinPbFieldChangeEventBufferGeneratedMessage.createRepeatedFieldGeneratedMessage.createMapFieldThese were used to implement events, which are unused internally. To keep API surface small (to make it easier to change the library or migrate to another library) these types and members are removed. (#738)
Breaking: CodedBufferWriter.writeRawBytes now takes a Uint8List
argument (instead of TypedData).
GeneratedMessageGenericExtensions.deepCopy is now annotated with
@useResult and will generate a warning when its result is not used.
(#896)
Breaking: PbMap.unmodifiable now takes key and value field types as
arguments, instead of another PbMap.
To migrate, use PbMap.unmodifiable(map.keyFieldType, map.valueFieldType)
instead of PbMap.unmodifiable(map). (#902)
Messages deserialized from JSON now generate the unknown fields when serialized as JSON.
Note that, as before, unknown fields in JSON messages are not stored in the
unknownFields of the message. They are only used by the JSON serializers to
support roundtripping.
Minimum SDK dependency bumped from 2.19.0 to 3.3.0. (#953)
CodedBufferReader readBytes now copies the returned bytes to avoid accidental sharing of the input buffer with the returned Uint8List. New member read
Remove ReadonlyMessageMixin ([#183], [#644])
2.19.ReadonlyMessageMixin (#183, #644)frozenMessageModificationHandler (#175, #643)PbListBase and FrozenPbList types. All proto repeated fields now
use PbList. To check if a list is frozen, use isFrozen getter. (#624,
#626)GeneratedMessage.getField. This behavior is
consistent with getField called on repeated fields. (#373, #707)PbMap constructor argument BuilderInfo? info.
(d94d3f0)UnknownFieldSetField methods hasRequiredFields, isInitialized and
getter length removed. (#721)PbMap._isReadonly field initialization in PbMap.unmodifiable.
(#741, #754)mergeFromBuffer, mergeFromProto3Json, ...). (#489, #727)null values in proto3 JSON deserializer. (#751, #760,
#763)reparseMessage. (#840)Update READMEs of protobuf and protoc_plugin:
protobuf and protoc_plugin:
Timestamp to Dart DateTime (#580,
#577)BuilderInfo and FieldInfo properties (#597)BuilderInfo initialization by doing some of the work lazily
(#606)Any messages from JSON (#568)repeated bytes and optional bytes fields.
(#640)GeneratedMessage.rebuild now generates a warning when the return value is
not used. (#631)protobuf.omit_field_names, enum value tags with
protobuf.omit_enum_names in debug strings (toString methods) (#649)TimestampMixin.toDateTime now takes an optional named bool argument
toLocal (defaults to false) for generating a DateTime in the local time
zone (instead of UTC). (#653)infinity and nan doubles in JSON serializers
(#652)Fix bug of parsing map-values with default values.
1.1.2 - 1.1.4 into v2.* Stable null safety release.
Nothing published for this version
Nothing published for this version
Fix comparison of empty lists from frozen messages.
dart format instead of dartfmt.Fix that fixed32 int could be negative.
Fix proto deserialization issue for repeated and map enum value fields where the enum value is unknown.
Fix decoding of oneof fields from proto3 json. The 'whichFoo' state would not be set.
oneof fields from proto3 json. The 'whichFoo' state would
not be set.copyWith.Use protoc_plugin from 19.1.0 to generate deprecation warnings for copyWith and clone methods.
GeneratedMessage.rebuild and
GeneratedMessage.deepCopy replacing copyWith and clone. Using these
alternatives can result in smaller binaries, because it is defined once
instead of once per class. Use protoc_plugin from 19.1.0 to generate
deprecation warnings for copyWith and clone methods.GeneratedMessage.getExtension throws when reading trying to read an
extension that is present in the unknown fields. We consider this change a
bug-fix because depending on the old behavior is indicative of a bug in your
program.Fix issue with ExtensionRegistry.reparseMessage not handling map fields with scalar value types correctly.
ExtensionRegistry.reparseMessage not handling map fields
with scalar value types correctly.protoName) not being set
correctly.Graduate package to 1.0. No functional changes.
Add permissiveEnums option to mergeFromProto3Json. It will do a case-insensitive matching of enum values ignoring - and _.
permissiveEnums option to mergeFromProto3Json. It will do a
case-insensitive matching of enum values ignoring - and _.protoc_plugin 19.0.0.String, int, and bool with usual default
values.getDefault().TagNumber. This is used by code generated by
protoc_plugin from version 19.0.0.Fix: Allow decoding tagnumbers of up to 29 bits. Would fail before with more than 28 bits.
The generated code for a protofile a.proto that import public "b.proto" will export the generated code for b.proto.
Support for import public.
The generated code for a protofile a.proto that import public "b.proto"
will export the generated code for b.proto.
See https://developers.google.com/protocol-buffers/docs/proto#importing-definitions.
Support for proto3 json (json with field names as keys)
Support for proto3 json (json with field names as keys)
GeneratedMessage.toProto3Json() to encode and
GeneratedMessage.mergeFromProto3Json(json) to decode.FieldInfo objects have a new getter .protoName that gives the
non-camel-case name of the field as in the .proto-file.
Breaking: The field-adder methods on BuilderInfo now takes only named
optional arguments. To migrate, update protoc_plugin to version 18.0.0 or
higher.
The field-adder methods on BuilderInfo all take a new argument
protoName.
Breaking: Changed ExtensionRegistry.reparseMessage to reparse
extensions deeply, that is it looks at every nested message and tries to
reparse extensions from its unknown fields.
Reverts 0.13.16 which accidentally introduced a breaking change, #284. This release is identical to 0.13.15.
0.13.16 which accidentally introduced a breaking change,
#284. This release is
identical to 0.13.15.Better handling of dummy calls to BuilderInfo.add with a tag number of 0. These would trigger assertions before.
BuilderInfo.add with a tag number of 0.
These would trigger assertions before.Add new getter GeneratedMessage.isFrozen to query if the message has been frozen.
GeneratedMessage.isFrozen to query if the message has been
frozen.Avoid needless copy when reading from a Uint8List buffer.
BuilderInfo.add now ignores fields with tag number 0. These would never be generated by the protoc_plugin so this is not considered a breaking change.
BuilderInfo.add now ignores fields with tag number 0. These would never be
generated by the protoc_plugin so this is not considered a breaking change.Save memory by only initializing _FieldSet.oneofCases if the message contains oneofs.
_FieldSet.oneofCases if the message
contains oneofs.Move 'eventPlugin' callback when setting a field in order to notify observers about field updates in the correct order.
Fix JSON serialization of unsigned 64-bit fields.
Fixed equality check between messages with and without extensions.
Deprecated BuilderInfo.pp and PbList.forFieldType.
Add new method pc on BuilderInfo for adding repeated composite fields and
remove redundant type check on items added to a PbList.
Deprecated BuilderInfo.pp and PbList.forFieldType.
Fix issue with parsing map field entries. The values for two different keys would sometimes be merged.
Fix issue with parsing map field entries. The values for two different keys would sometimes be merged.
Deprecated PBMap.add.
Include extension fields in GeneratedMessage.toString().
Fix issue with not being able to read unknown fields after freezing.
Reading an unknown field set after freeze() now returns the existing field set before freezing instead of an empty UnknownFieldSet.
Breaking change: Fix issue with not being able to read extensions after freezing.
Reading an extension field after freeze() now returns the value set before freezing instead of the default value.
Breaking change: Changed BuilderInfo.m() to take class and package name of the protobuf message representing the map entry. Also changed BuilderInfo.a…
Breaking change: Changed BuilderInfo.m() to take class and package name of
the protobuf message representing the map entry. Also changed
BuilderInfo.addMapField as well as the constructors PbMap and
MapFieldInfo.map to take a map entry BuilderInfo object.
This mostly affects generated code, which should now be built with protoc_plugin 15.0.0 or newer.
With this change we avoid creating a map entry BuilderInfo object for each PbMap instance, instead it is passed through the static BuilderInfo object in the generated subclasses of GeneratedMessage.
Breaking change: changed semantics of GeneratedMessage.toBuilder() to only make a shallow copy.
Breaking change: changed semantics of GeneratedMessage.toBuilder() to only
make a shallow copy.
GeneratedMessage has a new abstract method: createEmptyInstance() that
subclasses must implement.
Proto files must be rebuilt using protoc_plugin 14.0.0 or newer.
* Fix freezing of map fields.
Fixed problem with recursive merging of sub messages.
Added support for oneof. To use oneof support use Dart protoc_plugin version 13.0.0.
Added support for map fields. Map fields are now represented as Dart maps and are accessed through a getter with the same name as the map field. To us
Added separate getter for BuilderInfo.qualifiedMessageName.
BuilderInfo.qualifiedMessageName.Added type argument to ProtobufEnum.initByValue which allows the return value to be fully typed.
ProtobufEnum.initByValue which allows the return
value to be fully typed.Added ProtobufEnum reserved names.
Added Support for any messages.
Breaking change: Add GeneratedMessage.freeze(). A frozen message and its sub-messages cannot be changed.
GeneratedMessage.freeze(). A frozen message and its
sub-messages cannot be changed.Fix problem with encoding negative enum values.
Breaking change: Changed signature of CodedBufferWriter.writeTo to require Uint8List for performance.
CodedBufferWriter.writeTo to require
Uint8List for performance.Dart SDK upper constraint raised to declare compatibility with Dart 2.0 stable.
Breaking change: Added generics to RpcClient.invoke(). Proto files must be rebuilt using Dart protoc_plugin version 0.8.0 or newer to match.
* Fix hashing for PbList.
Fix type in PbList.fold() for Dart 2.
Added fast getters for common types.
Added enumValues to FieldInfo. Fixes #63.
Use real generic syntax instead of comment-based.
Your coding agent can read these notes before it upgrades. Set up the MCP server →