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

Make Version class constructor constant one #19

Open
ycherniavskyi opened this issue Jan 28, 2023 · 2 comments
Open

Make Version class constructor constant one #19

ycherniavskyi opened this issue Jan 28, 2023 · 2 comments

Comments

@ycherniavskyi
Copy link

It will be great to make Version class constructor a constant one, because this will allow using the const Version instance as a default value of an optional parameter.

Also, I see such change is fully backward compatible.

@ycherniavskyi
Copy link
Author

For sure, I could make a PR if it is necessary. But this improvement is only about adding const before the Version constructor.

@ycherniavskyi
Copy link
Author

Hmm, it seems everything not such easy as I expected :)

lib/version.dart:38:3: Error: A const constructor can't have a body.

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

No branches or pull requests

1 participant