0

我们是否有任何代码文档语法和工具支持从 Dart 应用程序代码生成代码文档,类似于 C/C++ 的 Doxygen。我更喜欢使用 Markdown 风格的语法而不是 doxygen 语法。

4

2 回答 2

4

DartDoc 工具(使用 markdown)创建 API 文档(在api.dartlang.org中找到)

描述了在您自己的代码中使用 DartDoc 的 api 参考

此处的Readme.txt显示了如何格式化代码注释以生成 API 文档

于 2012-10-01T13:36:31.690 回答
1
///I am the beerclass
class BeerClass{
  ///this is a beer variable
  String beername;

  ///this is a beer method
  String get getBeer => "beer for the people";
}

只需进入 Darteditor:Tools->Generate Dartdoc。您将获得一个新目录docs并在浏览器中启动 index.html。您的类、变量和方法现在有了文档。

于 2012-10-01T20:59:33.667 回答