It's very useful to be able to put dartdocs on setters specifically, even when the getter has one. However, most of the time, there's really nothing to say. It sets the thing that you can get, which is described in the getter.
It would be nice if we could silence the lint about dartdocs for the case of a setter with an identically named getter that already has a dartdoc.
cc @pq
cc @abarth
Good point. What does dartdoc do in this case? Does it repeat the doc?
@keertip ?
Take a look at the "opacity" property in this dartdoc:
http://docs.flutter.io/flutter/rendering/RenderOpacity-class.html
Here the getter has a docstring but the setter does not.
dartdoc does not explicitly show getters and setters, documents them as properties instead. It looks at both getter and setter for documentation.
Thanks all. I'll update the check to look for docs on one or the other (or both).
For Flutter we'd like, if there's both a getter and a setter but only one has a doc, for the doc to be on the getter, for consistency.
Most helpful comment
For Flutter we'd like, if there's both a getter and a setter but only one has a doc, for the doc to be on the getter, for consistency.