protobuf 0.10.5

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 95

Build Status pub package

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.

References

0.10.5

  • 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 use the map support, use Dart protoc_plugin version 11.0 or newer.

0.10.4

  • Added separate getter for BuilderInfo.qualifiedMessageName.

0.10.3

  • Added type argument to ProtobufEnum.initByValue which allows the return value to be fully typed.

0.10.2

  • Added ProtobufEnum reserved names.

0.10.1

  • Added Support for any messages.

0.10.0

  • Breaking change: Add GeneratedMessage.freeze(). A frozen message and its sub-messages cannot be changed.

0.9.1

  • Fix problem with encoding negative enum values.
  • Fix problem with encoding byte arrays.

0.9.0+1

  • Dart SDK upper constraint raised to declare compatability with Dart 2.0 stable.

0.9.0

  • Breaking change: Changed signature of CodedBufferWriter.writeTo to require Uint8List for performance.
  • More Dart 2 fixes.

0.8.0

  • Breaking change: Added generics to RpcClient.invoke(). Proto files must be rebuilt using Dart protoc_plugin version 0.8.0 or newer to match.
  • Dart 2 fixes.

0.7.2+1

  • Updated SDK version to 2.0.0-dev.17.0

0.7.2

  • Fix hashing for PbList.

0.7.1

  • Fix type in PbList.fold() for Dart 2.
  • Small performance tweaks for DDC.

0.7.0

  • Added fast getters for common types.
  • Only pass index instead of both tag and index to accessors.
  • Delegate more methods to underlying list in PbList.
  • Small fixes for Dart 2.0.

0.6.0

  • Added enumValues to FieldInfo. Fixes #63.
  • Small performance optimization when deserializing repeated messages from JSON.
  • Type annotations for strong mode.

0.5.5

  • Use real generic syntax instead of comment-based.
  • Support v2 dev SDKs.

0.5.4

  • Unknown enum values are ignored when parsing JSON, instead of throwing an exception.

0.5.3+2

  • Resolved a strong-mode error.

0.5.3+1

  • Performance: Avoid excessive cloning in merge.
  • Performance: Use code patterns that dart2js handles better.

0.5.3

  • fix zigzag function so all coded buffer reader tests work on dart2js.

0.5.2

  • make PbMixin constructor public for use within protoc plugin.

0.5.1+5

  • Revert previous change because it causes strong mode type error in the generated code. We will revisit this in a new version of mixin support.

0.5.1+4

  • Use a more refined implementation of Map in PbMapMixin

0.5.1+3

  • Performance: eliminate some dynamic calls.

0.5.1+2

  • Bugfix: remove dependency on pkg/crypto for real.

0.5.1+1

  • Require at least Dart SDK 1.13.

  • Removed dependency on pkg/crypto.

0.5.1

  • Experimental support for strong mode.
  • Fixed an issue with GeneratedMessage operator== and Map mixins
  • Added declaration of GeneratedMessage clone method

0.5.0+1

  • Support the latest version of package fixnum.

0.5.0

  • Reorganized internals to improve performance. We now store field values in a list instead of a map. Private properties and methods are all moved to the _FieldSet class. There are new entry points for generated getters, hazzers, and setters. Improved JSON decoding performance.
  • Dropped compatibility with .pb.dart files before 0.4.2 by removing internal constants from GeneratedMessage. Also, protoc plugins before 0.5.0 won't work.

0.4.2

  • Renamed FieldType to PbFieldType.

0.4.1 - DO NOT USE

  • added FieldType class. It turned out that FieldType is a commonly used name, even in .proto files. This is renamed to PbFieldType in 0.4.2.
  • Added support for observing field changes. For now, this can only be enabled by using a mixin to override the eventPlugin getter.
  • Removed optional third parameter from setField(). It was only intended for internal use, and could be used to defeat type checks on fields.
  • clearExtension() removes the value and extension in all cases. (Before, the extension would be kept and the list cleared for repeated fields.)
  • Upcoming: clearField() will require its argument to be a known tag number (which could be an extension). For now, this is only enforced when a mixin provides an eventPlugin.

0.4.0

  • Add ReadonlyMessageMixin. The generated message classes use this to for the default values of message fields.

0.3.11

  • Add meta.dart which declares reserved names for the plugin.

0.3.10

  • Add GeneratedService and ProtobufClient interfaces.

0.3.9

  • Add experimental mixins_meta library
  • Add experimental PbMapMixin class (in a separate library).
  • Fix bug where ExtensionRegistry would not be used for nested messages.

0.3.7

  • More docs.

0.3.6

  • Added mergeFromMap() and writeToJsonMap()
  • Fixed an analyzer warning.

0.3.5+3

  • Bugfix for setRange(): Do not assume Iterable has a sublist() method.

0.3.5+2

  • Simplify some types used in is checks and correct PbList to match the
  • signature of the List setRange method.

0.3.5+1

  • Bugfix for incorrect decoding of protobuf messages: Uint8List views with non-zero offsets were handled incorrectly.

0.3.5

  • 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.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  protobuf: ^0.10.5

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:protobuf/protobuf.dart';
  
Version Uploaded Documentation Archive
0.10.5 Nov 27, 2018 Go to the documentation of protobuf 0.10.5 Download protobuf 0.10.5 archive
0.10.4 Oct 2, 2018 Go to the documentation of protobuf 0.10.4 Download protobuf 0.10.4 archive
0.10.3 Sep 21, 2018 Go to the documentation of protobuf 0.10.3 Download protobuf 0.10.3 archive
0.10.2 Sep 6, 2018 Go to the documentation of protobuf 0.10.2 Download protobuf 0.10.2 archive
0.10.1 Aug 30, 2018 Go to the documentation of protobuf 0.10.1 Download protobuf 0.10.1 archive
0.10.0 Aug 30, 2018 Go to the documentation of protobuf 0.10.0 Download protobuf 0.10.0 archive
0.9.1 Aug 8, 2018 Go to the documentation of protobuf 0.9.1 Download protobuf 0.9.1 archive
0.9.0+1 Jul 18, 2018 Go to the documentation of protobuf 0.9.0+1 Download protobuf 0.9.0+1 archive
0.9.0 May 25, 2018 Go to the documentation of protobuf 0.9.0 Download protobuf 0.9.0 archive
0.8.0 May 17, 2018 Go to the documentation of protobuf 0.8.0 Download protobuf 0.8.0 archive

All 50 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
94
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
95
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:protobuf/protobuf.dart.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use protobuf.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.17.0 <3.0.0
fixnum >=0.9.0 <0.11.0 0.10.9
Dev dependencies
benchmark_harness any
js any
test >=1.2.0