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

Issue with .withValues Method in Project - Undefined or Incorrect Usage #59801

Closed
vishnu-appdeveloper opened this issue Dec 24, 2024 · 2 comments
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.

Comments

@vishnu-appdeveloper
Copy link

I am encountering an issue where the .withValues method is being used in my project, but it is resulting in errors across multiple files. The error message states that .withValues is not recognized and suggests correcting the name or defining the method. This issue occurs in all files where .withValues is used.

Error Message:

sql
Copy code
Try correcting the name to the name of an existing method, or defining a method named 'withValues'.
Steps to Reproduce:

Use .withValues in any Dart file.
Observe the error across all files where this method is invoked.
Expected Behavior:
I expected that .withValues would be a valid method either within a custom class or part of a package, but it seems to be either missing or incorrectly referenced.

Actual Behavior:
The error message appears, indicating that .withValues is not recognized as a valid method. This issue occurs across all files where .withValues is used.

Environment:

Dart version: (Provide your Dart version)
Flutter version: (Provide your Flutter version, if applicable)
Package versions: (Any relevant package versions like easy_date_timeline or others)
Possible Solution:
If .withValues is meant to be a custom method, I suggest ensuring that the method is correctly defined in the project or package. Alternatively, it might be a typographical error, and the correct method name should be used.

Additional Information:
Please let me know if any additional context or details are required to address this issue.

@vishnu-appdeveloper vishnu-appdeveloper added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Dec 24, 2024
@lrhn
Copy link
Member

lrhn commented Dec 25, 2024

There is no withValues method declared on any type in the Dart platform libraries.

I can see the Flutter has a withValue (singular) on its Color class.

Most likely the error messages are correct, there is no withValues method.

Which method did you expect to call? (Do you have a link to is documentation?)
Which types did you call it on?

@lrhn lrhn closed this as not planned Won't fix, can't repro, duplicate, stale Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
Projects
None yet
Development

No branches or pull requests

2 participants