Rating.newPercentageRating constructor Null safety

const Rating.newPercentageRating(
  1. double percent
)

Creates a new percentage rating.

Implementation

const Rating.newPercentageRating(double percent)
    : assert(
        percent >= 0 && percent <= 100,
        'Percentage must be in range from 0 to 100',
      ),
      _type = RatingStyle.percentage,
      _value = percent;