Generalize argument type of `PbList.from` from `List<T>` to `Iterable<T>` (#1054)

This is more consistent with `List.from` and also more efficient as we can
avoid redundant `List` allocations when we have an `Iterable` instead of a
`List`. This commonly happens when we create a `PbList` from a chain of `map`,
`where` etc. calls.

Also update the the factory body to use `List.of` instead of `List.from` as we
know the `Iterable`'s element type. (`List.from` takes `Iterable<dynamic>`,
`List.of` takes `Iterable<T>`)

cl/810421932
2 files changed
tree: 0f7dc3e2ac01c8cedba23dd962e9f2528660aa9e
  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.