-
Notifications
You must be signed in to change notification settings - Fork 316
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
Invalid constant value error when extracting a widget with a const TextStyle parameter #5374
Comments
Just to be clear @stephane-archer, these errors with refactors/assists/fixes are all under the SDK analyzer/analysis server or similar (commenting to you since I've seen some issues you opened there). We probably can fix them here but it'll still only come to the users in a new SDK release. |
I didn’t realize that the Dart SDK would be a more appropriate place to report this kind of issue. Would you like me to move it there instead? As for your point:
No worries! |
I'd say it's up to you or @DanTup which I don't think would mind having it here. But there are always more eyes there to possibly take a try on the fix. If you move it, you can (and I'd suggest) always link to this one so we know where it came from and people who end up here know where this conversation moved to. |
Sorry for not responding sooner. Most of the language functionality comes from the Dart language server which lives in the SDK (generally anything that requires parsing Dart code will live there, which means the functionality is also shared across IDEs). It's not always obvious what functionality comes from where so filing issues here is not a problem. If they're trivial fixes I can do quickly, I'll often just do them and reference the issue here - but for other things it's better to have them in SDK (where they'll have more visibility and may be fixed by others). Thanks! |
extract widget
Text("hello world", style: h1);
result:
There is an error regarding
h1
Invalid constant value.
expected result
Here is the correct code (the const keyword is not at the right place):
The text was updated successfully, but these errors were encountered: