Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to link to a symbol of a standard library in Dart doc comment?

Tags:

dart

I'd like to insert a link to the class Stream of dart:async in my doc comment of my Dart library:

/// Link to [Stream].
library my_lib;

import 'dart:async' show Stream;

export 'src/my_lib_base.dart';

If I generate and serve my doc comments with dartdocgen --include-sdk --serve ., the word Stream links to http://localhost:8080/#my_lib/my_lib.Stream, which is not a link to class Stream of dart:async. It shows the same page as http://localhost:8080/#my_lib/my_lib. How can I link to the doc comment page of class Stream of dart:async instead?

like image 810
maiermic Avatar asked Dec 06 '25 07:12

maiermic


1 Answers

If Stream is in scope it should properly link to it. I think this is a bug, but dartdocgen seems to be deprecated. Use https://github.com/dart-lang/dartdoc instead.

like image 156
Günter Zöchbauer Avatar answered Dec 08 '25 00:12

Günter Zöchbauer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!