-
Notifications
You must be signed in to change notification settings - Fork 120
dartdoc comment references
jcollins-g edited this page Jun 21, 2018
·
10 revisions
Comment references are wrapped in brackets within comments preceding classes, library declarations, member variables/functions, and so forth. They are resolved first to parameters for the function (though not linked), then to their enclosing class and library.
- Type parameters, parentheses, and a leading "new " will be ignored
Default constructor: [MyClass.MyClass]
Named constructors: [MyClass.namedConstructor]
From a class with a conflicting member name, the top-level variable of the same name in that library:
library mylib;
final String myString = "hi";
class A {
final String myString = "there";
// [myString] - refers to A.myString
// [myLib.myString] - refers to the top level myString
void foo() {}
}