-
Notifications
You must be signed in to change notification settings - Fork 187
Generated Dart code expects PbMap
instead of Map
which is hard to create
#975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think we should probably either under the #903 change partially or - if narrower type actually leads to some benefits - we should provide a convenient way to create these. |
Good catch -- the factory argument type does not need to be a This change was done a while ago and I don't remember the details, but it must've been unintentional. I changed how the field is represented and that effected factory argument types as well. We can and should distinguish those two. We can make the argument type For now, as a work around, you can create an empty message and then add the map elements with |
Previously it was:
now it is:
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 withPbList
which just exposes.from(List<E> from)
constructorThe text was updated successfully, but these errors were encountered: