starRating property

int starRating

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.

Implementation

int get starRating {
  if (type != RatingStyleMessage.range3stars &&
      type != RatingStyleMessage.range4stars &&
      type != RatingStyleMessage.range5stars) {
    return -1;
  }
  return value as int? ?? -1;
}