Rating class
A rating to attach to a MediaItem.
Constructors
- Rating.newHeartRating(bool hasHeart)
-
Creates a new heart rating.
const
- Rating.newPercentageRating(double percent)
-
Creates a new percentage rating.
const
- Rating.newStarRating(RatingStyle style, int rating)
- Creates a new star rating.
- Rating.newThumbRating(bool isThumbsUp)
-
Creates a new thumb rating.
const
- Rating.newUnratedRating(RatingStyle ratingStyle)
-
Creates a new unrated rating.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getPercentRating(
) → double -
Returns a percentage rating value greater or equal to
0.0
, 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.0
, 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 RatingStyle.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 RatingStyle.thumbUpDown or if it is unrated.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override