Originally posted in #59724:
From #59910 (comment):
Dartdoc prefers the A.foo instance member. To specifically refer to the constructor, you can use A.foo(). We should document this behavior here: https://dart.dev/tools/doc-comments/references
So for this code, you can differentiate between them:
/// A class with [A.foo] and [A.foo()]
class A {
int foo = 0;
A.foo();
}
But there is no colouring for A.foo() (currently being suggested correctly). [...]

Also noticed the . has no colouring here. Not a big deal but it is a bit weird.
CC @DanTup