Questions tagged [dartdoc]

DartDoc is the official "API documentation tool for Dart".

DartDoc is used "to generate HTML documentaton for your Dart package".

The dartdoc package can be found on Pub along with a GitHub repo for DartDoc

32 questions
20
votes
2 answers

dartdoc failed: Top level package requires Flutter but FLUTTER_ROOT environment variable not set

I am trying to run dartdoc for my flutter package but I am getting this, dartdoc failed: Top level package requires Flutter but FLUTTER_ROOT environment variable not set. How to add FLUTTER_ROOT environment variable as I have already added…
Shahzad Akram
  • 4,586
  • 6
  • 32
  • 65
13
votes
1 answer

How do I create DartDoc Macros/Templates in Dart and Flutter?

I have seen snippets like the following throughout the Flutter repo: /// {@macro flutter.widgets.editableText.readOnly} In the IDE and in the rendered Dart docs, it is then shown like this: Whether the text can be changed. When this is set to…
creativecreatorormaybenot
  • 114,516
  • 58
  • 291
  • 402
8
votes
1 answer

How to get dartdoc to include additional documentation?

I would like to understand if there is a way for me to include additional documentation with the API docs that get generated by dartdoc. According to the Package layout conventions there is a getting_started.md file included inside the doc/…
ra9r
  • 4,528
  • 4
  • 42
  • 52
5
votes
2 answers

dart show documentation from another method in another file

Is it possible to show the documentation of a function in the documentation of another function residing in a different file? Macros are only valid in their own file. In the Flutter source code, they use something like this, but it does not seem to…
Ced
  • 15,847
  • 14
  • 87
  • 146
3
votes
0 answers

DartDoc: How do I display DartPad in the documentation for my Flutter app

I'm trying to create documentation using DartDoc for my components in my Flutter app for my colleagues to use. So far I have managed to display the docs. But I need to provide a sample code in dartpad using Snippets. This is the code: /// A basic…
Giraldi
  • 16,451
  • 6
  • 33
  • 52
3
votes
1 answer

Using dartdoc categories

Trying to understand the purpose/usage of categories in dartdoc. What do they do? Do they re-arrange the output and group it in the categories? Is there a complete example of how they are used? My Use Case I've generated a set of docs with dartdoc…
rickb
  • 601
  • 5
  • 19
3
votes
0 answers

Dartdoc raises an error whenever I use it

When I'm trying to document my dart code, I get the following error: Unhandled exception: Invalid argument (uri): Unknown package: Instance of '_SimpleUri' #0 ResourceLoader.resolveResourceUri.
Cutewarriorlover
  • 158
  • 2
  • 11
3
votes
1 answer

Using local image assets in dart documentation comments

How can you use local assets in a dart documentation comment? This works fine when using a webbased url,, like so: /// ![A row of icons representing a pink heart, a green musical note, and a blue…
Isak dl
  • 448
  • 3
  • 13
2
votes
1 answer

Include additional documentation in dartdoc like go_router does

The package, go_router, successfully lists additional documentation as topics on its documentation page. You see them as a sidebar on the left-hand side of the page. I've examined the approach used and read the documentation provided: go_router's…
Andrious Solutions
  • 706
  • 1
  • 7
  • 23
2
votes
0 answers

Is it possible to include package structure to a flutter project documentation?

I use dartdoc to generate documentation of a Flutter project. The documentation is generated, but there is no structure to it. For example if I have file structure like this DirA Dir1 Widget1 Widget2 Widget3 Widget4 The documentation…
David Holkup
  • 372
  • 2
  • 9
2
votes
1 answer

Flutter Dartdoc: How to Document State Objects in Statefull Widgets?

This is a part of a project where i am building a clone of the Flickr App for educational purposes. I am playing around for the first time with Dartdoc and Documentation concept in general, I managed to use Dartdoc and create a Doc folder with…
2
votes
1 answer

Flutter cannot generate docs with dartdoc

I am not able to generate the documentation of the code by using the dartdoc tool located at C:\flutter\bin\cache\dart-sdk\bin. This is what I do: Go to the project dir dir C:\Users\alber\Documents\progetto_fomet\fomet_app\lib Call the command…
Paul L
  • 73
  • 7
1
vote
0 answers

Dart doc puts everything under same " folder " called libraries

When using dart doc, it puts all my source code files under the same " folder " - libraries. E.g I have file "A.dart" in lib/directoryA and file "B.dart" in lib/directoryB. Both of them are just listed as: Libraries A.dart B.dart Is there any way…
MinisX
  • 107
  • 1
  • 9
1
vote
1 answer

Does dart doc support generation of markdown instead of HTML?

I have dart doc . working and generating HTML files. I want to generate Markdown files instead. When googling, I found this answer https://github.com/dart-lang/dartdoc/issues/1479#issuecomment-868961953 - which led me to this PR:…
jhaaaa
  • 96
  • 10
1
vote
1 answer

dart doc not generating documentation for sub folders?

"dart doc ." (or "dart doc") command is generation docs but only for everything in lib folder not sub folders. I have a src folder in lib which have other sub folders [lib > src > models > my_modal.dart] but after running command html is only…
Akshat Tamrakar
  • 2,193
  • 2
  • 13
  • 21
1
2 3