Skip to content

Use = to document default values for named parameters - Fixes #2087 #2453

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

Merged

Conversation

parlough
Copy link
Member

@parlough parlough commented Dec 9, 2020

It is suggested in Effective Dart to use = for assigning default values for optional named parameters to be consistent with positional ones as well, so this special handling can be removed.

Fixes #2087

@google-cla google-cla bot added the cla: yes Google CLA check succeeded. label Dec 9, 2020
@parlough parlough force-pushed the fix/default-parameter-formatting branch from 2b54cd9 to efd7295 Compare December 9, 2020 06:21
@jcollins-g
Copy link
Contributor

Thanks for the contribution! It looks like some tests need to be updated, but otherwise this is looking good.

@parlough
Copy link
Member Author

@jcollins-g Thanks for pointing that out, should be good to go now!

@jcollins-g jcollins-g merged commit 58ddf4d into dart-lang:master Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA check succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default values for named parameters are documented using a : instead of =.
2 participants