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

Code generator uses wrong linter rule #282

Open
LennartCode opened this issue Feb 16, 2025 · 0 comments
Open

Code generator uses wrong linter rule #282

LennartCode opened this issue Feb 16, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@LennartCode
Copy link

Problem Description

After upgrading the SDK, the linter complains, as a wrong linter rule is used:

A value for optional parameter 'scriptCode' isn't ever given.
Try removing the unused parameter.
A value for optional parameter 'countryCode' isn't ever given.
Try removing the unused parameter.

Relevant code snippet:
In translations.g.dart inside the AppLocale enum:

const AppLocale({
    required this.languageCode,
    this.scriptCode, // ignore: unused_element
    this.countryCode, // ignore: unused_element
});

Suggestion

The linter suggests the rule unused_element_parameter instead.

Version Information

Flutter version: 3.29.0, stable
Framework revision: 35c388afb5
Dart version: 3.7.0
flutter_lints package: 5.0.0

@Tienisto Tienisto added the bug Something isn't working label Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants