StarRatingDisplay constructor

const StarRatingDisplay({
  1. Key? key,
  2. int starCount = 5,
  3. required double rating,
  4. Duration animationDuration = const Duration(milliseconds: 1000),
  5. double starSize = 40.0,
  6. double starSpacing = 4.0,
  7. Color selectedFillColor = Colors.amber,
  8. bool showSelectedBorder = true,
  9. Color selectedStrokeColor = Colors.amber,
  10. double selectedStrokeWidth = 2.0,
  11. Color unselectedStrokeColor = Colors.grey,
  12. double unselectedStrokeWidth = 2.0,
  13. StarEdgeShape starEdgeShape = StarEdgeShape.smooth,
  14. BoxDecoration? decoration,
})

Implementation

const StarRatingDisplay({
  super.key,
  this.starCount = 5,
  required this.rating,
  this.animationDuration = const Duration(milliseconds: 1000),
  this.starSize = 40.0,
  this.starSpacing = 4.0,
  this.selectedFillColor = Colors.amber,
  this.showSelectedBorder = true,
  this.selectedStrokeColor = Colors.amber,
  this.selectedStrokeWidth = 2.0,
  this.unselectedStrokeColor = Colors.grey,
  this.unselectedStrokeWidth = 2.0,
  this.starEdgeShape = StarEdgeShape.smooth,
  this.decoration,
});