If you write [Foo.bar], you link to Foo.bar and the link text is Foo.bar.
There is no way to link to Foo.bar with a text of, fx, Foo.current.bar. Or anything else.
Currently if you write, as I did: [`Platform.current.nativePlatform`][Platform.nativePlatform],
the link does link to the documentation for Platform.nativePlatform, but the text is still Platform.nativePlatform too.
I don't know where the link text went. It's not in the output at all.
I'm pretty sure this is actually a bug, because DartDoc tries to not intercept Markdown reference-style links ([text][reference]) like:
The [banana][Bananas] is fine.
[Bananas]: http://example.com/bananas "example of bananas"
so it should have ignored the [Platform.nativePlatform].
It would be nice if it had actually worked. When DartDoc sees a markdown reference-style link, and it cannot find the target for the link (no Platform.nativePlatform link target defined in the document) then DartDoc should take over and try to interpret it as a doc element link.
It would let you make nice links to any documentable element, with full control over the link text.
Then a normal dartdoc link like [Platform.nativePlatform] is just short for [`Platform.nativePlatform`][Platform.nativePlatform].
If you write
[Foo.bar], you link toFoo.barand the link text isFoo.bar.There is no way to link to
Foo.barwith a text of, fx,Foo.current.bar. Or anything else.Currently if you write, as I did:
[`Platform.current.nativePlatform`][Platform.nativePlatform],the link does link to the documentation for
Platform.nativePlatform, but the text is stillPlatform.nativePlatformtoo.I don't know where the link text went. It's not in the output at all.
I'm pretty sure this is actually a bug, because DartDoc tries to not intercept Markdown reference-style links (
[text][reference]) like:so it should have ignored the
[Platform.nativePlatform].It would be nice if it had actually worked. When DartDoc sees a markdown reference-style link, and it cannot find the target for the link (no
Platform.nativePlatformlink target defined in the document) then DartDoc should take over and try to interpret it as a doc element link.It would let you make nice links to any documentable element, with full control over the link text.
Then a normal dartdoc link like
[Platform.nativePlatform]is just short for[`Platform.nativePlatform`][Platform.nativePlatform].