diff --git a/protobuf/CHANGELOG.md b/protobuf/CHANGELOG.md index 671aa7dc..fbdedfe5 100644 --- a/protobuf/CHANGELOG.md +++ b/protobuf/CHANGELOG.md @@ -4,10 +4,13 @@ * Fix unknown enum handling in `GeneratedMessage.mergeFromProto3Json` when the `ignoreUnknownFields` optional argument is `true`. ([#853]) * Add `BuilderInfo` methods to support protoc-plugin 23.0.0. ([#1047]) +* Generalize argument type of `PbList.from` from `List` to `Iterable`. + ([#1054]) [#742]: https://github.com/google/protobuf.dart/pull/742 [#853]: https://github.com/google/protobuf.dart/pull/853 [#1047]: https://github.com/google/protobuf.dart/pull/1047 +[#1054]: https://github.com/google/protobuf.dart/pull/1054 ## 4.2.0 diff --git a/protobuf/lib/src/protobuf/pb_list.dart b/protobuf/lib/src/protobuf/pb_list.dart index d759ce03..04712780 100644 --- a/protobuf/lib/src/protobuf/pb_list.dart +++ b/protobuf/lib/src/protobuf/pb_list.dart @@ -40,8 +40,8 @@ class PbList extends ListBase { _check = _checkNotNull, _isReadOnly = true; - PbList.from(List from) - : _wrappedList = List.from(from), + PbList.from(Iterable from) + : _wrappedList = List.of(from), _check = _checkNotNull; @override