GlassRating constructor

const GlassRating({
  1. Key? key,
  2. required double value,
  3. required ValueChanged<double>? onChanged,
  4. int count = 5,
  5. bool allowHalf = false,
  6. double size = 28,
  7. double spacing = 4,
  8. Color? color,
  9. Color? emptyColor,
  10. String? semanticLabel,
  11. FocusNode? focusNode,
  12. bool autofocus = false,
})

Creates a star rating; count and size must be positive and spacing not negative.

Implementation

const GlassRating({
  super.key,
  required this.value,
  required this.onChanged,
  this.count = 5,
  this.allowHalf = false,
  this.size = 28,
  this.spacing = 4,
  this.color,
  this.emptyColor,
  this.semanticLabel,
  this.focusNode,
  this.autofocus = false,
}) : assert(count > 0),
     assert(size > 0),
     assert(spacing >= 0);