You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void main() {
runApp(const MyApp());
final p1 = Point(x: 1, y: 2);
final p2 = Point2(x: 1, y: 2);
}
class Point {
Point({num? x, num? y}) {
this.x = x;
this.y = y;
}
num? x, y;
}
class Point2 {
Point2({this.x, this.y});
num? x, y;
}
When you, find all references on the 'x' constructor parameter of class Point, you find the line where p1 is being created inside of main(). this is desired.
However, when you use the "initializing formals" syntax, which is promoted by the plugin, and you find all references on the 'x' constructor parameter of the Point2 class, you no longer get the line where p2 is being created inside main(). You only see references to where the field is being used inside the class. This seems like a problem. See screenshot:
Operating System and version: arch linux (latest updates)
Thanks for the report. This came up previously in #4535 and has been fixed. The fixed is in the language server, so it'll show up in a future Dart/Flutter SDK release.
Hello!
Consider this code:
When you, find all references on the 'x' constructor parameter of class Point, you find the line where p1 is being created inside of main(). this is desired.
However, when you use the "initializing formals" syntax, which is promoted by the plugin, and you find all references on the 'x' constructor parameter of the Point2 class, you no longer get the line where p2 is being created inside main(). You only see references to where the field is being used inside the class. This seems like a problem. See screenshot:
Thank you for your consideration, and for a pretty great experience overall!
The text was updated successfully, but these errors were encountered: