RatingBar constructor

const RatingBar({
  1. Key? key,
  2. required RatingWidget ratingWidget,
  3. required ValueChanged<double> onRatingUpdate,
  4. Color? glowColor,
  5. double? maxRating,
  6. TextDirection? textDirection,
  7. Color? unratedColor,
  8. bool allowHalfRating = false,
  9. Axis direction = Axis.horizontal,
  10. bool glow = true,
  11. double glowRadius = 2,
  12. bool ignoreGestures = false,
  13. double initialRating = 0.0,
  14. int itemCount = 5,
  15. EdgeInsetsGeometry itemPadding = EdgeInsets.zero,
  16. double itemSize = 40.0,
  17. double minRating = 0,
  18. bool tapOnlyMode = false,
  19. bool updateOnDrag = false,
  20. WrapAlignment wrapAlignment = WrapAlignment.start,
})

Creates RatingBar using the ratingWidget.

Implementation

const RatingBar({super.key,
  /// Customizes the Rating Bar item with [RatingWidget].
  required RatingWidget ratingWidget,
  required this.onRatingUpdate,
  this.glowColor,
  this.maxRating,
  this.textDirection,
  this.unratedColor,
  this.allowHalfRating = false,
  this.direction = Axis.horizontal,
  this.glow = true,
  this.glowRadius = 2,
  this.ignoreGestures = false,
  this.initialRating = 0.0,
  this.itemCount = 5,
  this.itemPadding = EdgeInsets.zero,
  this.itemSize = 40.0,
  this.minRating = 0,
  this.tapOnlyMode = false,
  this.updateOnDrag = false,
  this.wrapAlignment = WrapAlignment.start,
})  : _itemBuilder = null,
      _ratingWidget = ratingWidget;