RatingIndicator constructor

const RatingIndicator({
  1. Key? key,
  2. required double value,
  3. int amount = 5,
  4. IconData ratedIcon = CupertinoIcons.star_fill,
  5. IconData unratedIcon = CupertinoIcons.star,
  6. Color? iconColor,
  7. double iconSize = 16,
  8. ValueChanged<double>? onChanged,
  9. String? semanticLabel,
})

Creates a rating indicator.

iconSize must be non-negative.

amount must be greater than 0

value must be in range of 0 to amount

Implementation

const RatingIndicator({
  Key? key,
  required this.value,
  this.amount = 5,
  this.ratedIcon = CupertinoIcons.star_fill,
  this.unratedIcon = CupertinoIcons.star,
  this.iconColor,
  this.iconSize = 16,
  this.onChanged,
  this.semanticLabel,
})  : assert(iconSize >= 0),
      assert(amount > 0),
      assert(value >= 0 && value <= amount),
      super(key: key);