Skip to content

Commit bda0830

Browse files
authored
Merge pull request ryanheise#57 from hacker1024/patch-2
Some more rating stuff can be final and const
2 parents 9949bf4 + da03a35 commit bda0830

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/audio_service.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ enum RatingStyle {
105105
/// A rating to attach to a MediaItem.
106106
class Rating {
107107
final RatingStyle _type;
108-
dynamic _value;
108+
final dynamic _value;
109109

110-
Rating._internal(this._type, this._value);
110+
const Rating._internal(this._type, this._value);
111111

112112
/// Create a new heart rating.
113-
Rating.newHeartRating(bool hasHeart) : this._internal(RatingStyle.heart, hasHeart);
113+
const Rating.newHeartRating(bool hasHeart) : this._internal(RatingStyle.heart, hasHeart);
114114

115115
/// Create a new percentage rating.
116116
factory Rating.newPercentageRating(double percent) {
@@ -128,10 +128,10 @@ class Rating {
128128
}
129129

130130
/// Create a new thumb rating.
131-
Rating.newThumbRating(bool isThumbsUp) : this._internal(RatingStyle.thumbUpDown, isThumbsUp);
131+
const Rating.newThumbRating(bool isThumbsUp) : this._internal(RatingStyle.thumbUpDown, isThumbsUp);
132132

133133
/// Create a new unrated rating.
134-
Rating.newUnratedRating(RatingStyle ratingStyle) : this._internal(ratingStyle, null);
134+
const Rating.newUnratedRating(RatingStyle ratingStyle) : this._internal(ratingStyle, null);
135135

136136
/// Return the rating style.
137137
RatingStyle getRatingStyle() => _type;

0 commit comments

Comments
 (0)