'How to document Flutter widgets and screens classes in my app?

I don't know what is the common way and best practices used in documenting UI widgets and components in a Flutter app, I could find a good resource on how to document dart code in general here And how you can describe a function behavior or a model attribute. But what is the best way to add comments for UI Classes, Screens, Refactored Widgets, etc.. so that it can be helpful and describes the widget or the screen contents?



Solution 1:[1]

The whole flutter project is open source. You could always check how the flutter team documents its widgets.

For example, here is the source of the Container widget:

https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/container.dart

Personally, I would only document widgets which I publish as part of a library. But tastes are different :D

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tim Brückner