Invalid constant value error when extracting a widget with a const TextStyle parameter #59778
Labels
analyzer-refactoring
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Originally reported: Dart-Code/Dart-Code#5374
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: