RatingBar constructor
const
RatingBar({
- Key? key,
- required RatingWidget ratingWidget,
- required ValueChanged<
double> onRatingUpdate, - Color? glowColor,
- double? maxRating,
- TextDirection? textDirection,
- Color? unratedColor,
- bool allowHalfRating = false,
- Axis direction = Axis.horizontal,
- bool glow = true,
- double glowRadius = 2,
- bool ignoreGestures = false,
- double initialRating = 0.0,
- int itemCount = 5,
- EdgeInsetsGeometry itemPadding = EdgeInsets.zero,
- double itemSize = 40.0,
- double minRating = 0,
- bool tapOnlyMode = false,
- bool updateOnDrag = false,
- 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;