Closed
Description
Previously it was:
class Foo extends $pb.GeneratedMessage {
factory Foo({
$core.Map<$core.String, Bar>? bars,
}) {
final $result = create();
if (bars!= null) {
$result.bars.addAll(bars);
}
return $result;
}
...
}
now it is:
class Foo extends $pb.GeneratedMessage {
factory Foo({
$pb.PbMap<$core.String, Bar>? bars,
}) {
final $result = create();
if (bars!= null) {
$result.bars.addAll(bars);
}
return $result;
}
...
}
Creating PbMap
manually is very problematic, as it expects 2 ints (one for key and one for value). Personally I don't know how to obtain them. Situation is much simpler with PbList
which just exposes .from(List<E> from)
constructor
Metadata
Metadata
Assignees
Labels
No labels