Rating class

A rating to attach to a MediaItem.

Constructors

Rating.newHeartRating(bool hasHeart)
Create a new heart rating.
const
Rating.newPercentageRating(double percent)
Create a new percentage rating.
factory
Rating.newStartRating(RatingStyle starRatingStyle, int starRating)
Create a new star rating.
factory
Rating.newThumbRating(bool isThumbsUp)
Create a new thumb rating.
const
Rating.newUnratedRating(RatingStyle ratingStyle)
Create a new unrated rating.
const

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

getPercentRating() double
Returns a percentage rating value greater or equal to 0.0f, or a negative value if the rating style is not percentage-based, or if it is unrated.
getRatingStyle() RatingStyle
Return the rating style.
getStarRating() int
Returns a rating value greater or equal to 0.0f, or a negative value if the rating style is not star-based, or if it is unrated.
hasHeart() bool
Returns true if the rating is "heart selected" or false if the rating is "heart unselected", if the rating style is not heart or if it is unrated.
isRated() bool
Return whether there is a rating value available.
isThumbUp() bool
Returns true if the rating is "thumb up" or false if the rating is "thumb down", if the rating style is not thumbUpDown or if it is unrated.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited