Skip to content
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

tighten MapBuilder factory parameter #279

Open
ahmednfwela opened this issue May 12, 2023 · 2 comments
Open

tighten MapBuilder factory parameter #279

ahmednfwela opened this issue May 12, 2023 · 2 comments
Assignees

Comments

@ahmednfwela
Copy link

MapBuilder currently has the factory: factory MapBuilder([map = const {}])
I think it should be

factory MapBuilder([map = const <K, V>{}])

there are also other instances where dynamic is used instead of strict types, is that intentional? e.g. #241

@davidmorgan
Copy link
Contributor

Thanks Ahmed!

These APIs were designed way back in the Dart 1 days when type annotations didn't matter so much and there was no type inference.

I have a plan for a pile of changes like the one you suggest at some point, to modernize the APIs; but they are breaking changes so they will take some work to land. I'm not sure when that will happen.

Actually now that Dart 3 has launched the right time might be now, I will give it some thought.

Thanks!

@ahmednfwela
Copy link
Author

that's really great! I will be happy to help contribute with some PRs once you share your plan 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants