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

"Parameters can't override default values" warning in generated toString method #48

Closed
carlowenig opened this issue Feb 15, 2020 · 3 comments

Comments

@carlowenig
Copy link

Hi there,
great progress so far on the project, I like the new additions!

I get a warning in all generated freezed files which says:

Parameters can't override default values, this method overrides 'DiagnosticableMixin.toString' where 'minLevel' has a different value.

It refers to the minLevel parameter of the toString method in the _$_Model class.

Nothing too serious for now, but it would be nice to get rid of this warning.
Thanks!

@rrousselGit
Copy link
Owner

The default value has changed recently, and Freezed is using the latest version.

You're likely using "stable" channel which has yet to receive the change

@carlowenig
Copy link
Author

I've tested with flutter beta, dev and master channel and I still get the warning. I am writing an app for production use so I'd like to stay on the stable or beta channel. Would it be possible to generate // ignore_for_file: invalid_override_different_default_values_named until the flutter change is in the stable release? That would be really helpful for me.

@rrousselGit
Copy link
Owner

I've added such ignore

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

2 participants