【发布时间】:2018-03-20 22:03:27
【问题描述】:
在 mirrors.dart 源码中,你可以找到这个:
/**
* Class used for encoding comments as metadata annotations.
*/
class Comment {
/**
* The comment text as written in the source text.
*/
final String text;
/**
* The comment text without the start, end, and padding text.
*
* For example, if [text] is [: /** Comment text. */ :] then the [trimmedText]
* is [: Comment text. :].
*/
final String trimmedText;
/**
* Is [:true:] if this comment is a documentation comment.
*
* That is, that the comment is either enclosed in [: /** ... */ :] or starts
* with [: /// :].
*/
final bool isDocComment;
const Comment(this.text, this.trimmedText, this.isDocComment);
}
但是,该类未在其他任何地方使用。 我们如何才能使用该功能?我想反映字段的文档。
【问题讨论】:
标签: dart dart-mirrors