Skip to content

Commit 12517e6

Browse files
authored
Remove the incorrect guidance on linking to the unnamed constructor. (#3006)
Ideally, we tell people how to do this, but the current dartdoc syntax is kind of weird, so I think it's best for now to just say nothing. Fix #1244.
1 parent b324f36 commit 12517e6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

null_safety_examples/misc/lib/effective_dart/docs_good.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void miscDeclAnalyzedButNotTested() {
8484
void method1() {}
8585

8686
// #docregion ctor
87-
/// To create a point, call [Point()] or use [Point.polar()] to ...
87+
/// To create a point from polar coordinates, use [Point.polar()].
8888
// #enddocregion ctor
8989
void method2() {}
9090
};

src/_guides/language/effective-dart/documentation_migrated.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,12 @@ separated by a dot:
321321
/// Similar to [Duration.inDays], but handles fractional days.
322322
{% endprettify %}
323323

324-
The dot syntax can also be used to refer to named constructors. For the unnamed
325-
constructor, put parentheses after the class name:
324+
The dot syntax can also be used to refer to named constructors:
326325

327326
{:.good}
328327
<?code-excerpt "docs_good.dart (ctor)"?>
329328
{% prettify dart tag=pre+code %}
330-
/// To create a point, call [Point()] or use [Point.polar()] to ...
329+
/// To create a point from polar coordinates, use [Point.polar()].
331330
{% endprettify %}
332331

333332
### DO use prose to explain parameters, return values, and exceptions.

0 commit comments

Comments
 (0)