Provides runtime support for a Dart implementation of protobufs.
Typically one do not need to import this library–only libraries generated by the protoc plugin import this library directly.
If your library or application uses generated protobuf libraries, add this library as a dependency.
Fix issue with parsing map field entries. The values for two different keys would sometimes be merged.
Reading an unknown field set after freeze() now returns the existing field set before freezing instead of an empty UnknownFieldSet.
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.addMapField as well as the constructors
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.
GeneratedMessage has a new abstract method:
createEmptyInstance() that subclasses must
Proto files must be rebuilt using protoc_plugin 14.0.0 or newer.
ProtobufEnum.initByValuewhich allows the return value to be fully typed.
GeneratedMessage.freeze(). A frozen message and its sub-messages cannot be changed.
Require at least Dart SDK 1.13.
Removed dependency on
setRange(): Do not assume Iterable has a
Allow constants as field initial values as well as creation thunks to reduce generated code size.
Improve the performance of reading a protobuf buffer.
Fixed truncation error in least significant bits with large Int64 constants.
Add this to your package's pubspec.yaml file:
dependencies: protobuf: ^0.13.3
You can install packages from the command line:
$ pub get
$ flutter packages get
Alternatively, your editor might support
pub get or
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.13.3||Feb 12, 2019|
|0.13.2||Feb 5, 2019|
|0.13.1||Feb 4, 2019|
|0.13.0||Jan 22, 2019|
|0.12.0||Jan 15, 2019|
|0.11.0||Jan 8, 2019|
|0.10.8||Jan 8, 2019|
|0.10.7||Jan 8, 2019|
|0.10.6||Jan 2, 2019|
|0.10.5||Nov 27, 2018|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Feb 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter, web, other
No platform restriction found in primary library
lib/src/protobuf/readonly_message.dart. (-0.50 points)
lib/src/protobuf/readonly_message.dart reported 1 hint:
line 52 col 44: Don't explicitly initialize variables to null.
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
protobuf.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.