audio_service icon indicating copy to clipboard operation
audio_service copied to clipboard

RatingStyle.none documentation needs to be improved

Open nt4f04uNd opened this issue 4 years ago • 2 comments

To which pages does your suggestion apply?

In-code

Quote the sentences(s) from the documentation to be improved (if any)

enum RatingStyle {
  /// Indicates a rating style is not supported.
  ///
  /// A [Rating] will never have this type, but can be used by other classes
  /// to indicate they do not support Rating.
  none,

Describe your suggestion

It's opaque what exactly this sentence means.

  • Does that mean that the call from platform will never have this style?
  • Does that mean that I cannot set the Rating style to that value?
  • By which other classes it can be used?

nt4f04uNd avatar Jun 11 '21 17:06 nt4f04uNd

Also, the getters on the RatingMessage seem to be a little bit out of place. Some of them allow invalid range values and I feel like they probably should be removed. Still, I will write the tests for them for now.

nt4f04uNd avatar Jun 11 '21 17:06 nt4f04uNd

I haven't used this feature myself so I can't speak to what this means (@hacker1024 ?) However the source Android documentation is the culprit here:

https://developer.android.com/reference/android/media/Rating#RATING_NONE

Indicates a rating style is not supported. A Rating will never have this type, but can be used by other classes to indicate they do not support Rating.

ryanheise avatar Jun 12 '21 00:06 ryanheise