Open incendial opened 1 month ago
Summary: The Dart analyzer provides inconsistent constructor completion suggestions depending on whether the class is imported with a named import. The default constructor is only suggested when using a named import, which is unexpected and potentially confusing for users.
I guess the first question is: which behavior is better? It seems a bit odd to me to suggest new
because it's not a coding style we want to encourage, but it is valid so others might have a different opinion.
Hi, consider the following example:
when I type the name of this class and add
.
- only the named constructor appears in the completion suggestions:but when the class is imported via named imports, the default constructor also appears in the completion suggestions:
which is inconsistent (and does not look like the desired behavior)
Dart SDK version: 3.4.3 (stable) (Tue Jun 4 19:51:39 2024 +0000) on "macos_arm64"