DesignRating constructor

const DesignRating({
  1. Key? key,
  2. required double value,
  3. required ValueChanged<double>? onChanged,
  4. required DesignRatingItemBuilder itemBuilder,
  5. int itemCount = 5,
  6. bool allowHalf = false,
  7. bool readOnly = false,
  8. DesignRatingLayoutBuilder? layoutBuilder,
  9. ValueChanged<double>? onChangeStart,
  10. ValueChanged<double>? onChangeEnd,
  11. String? semanticLabel,
  12. String semanticFormatterCallback(
    1. double value
    )?,
  13. FocusNode? focusNode,
  14. bool autofocus = false,
  15. MouseCursor? mouseCursor,
})

A rating showing value.

Implementation

const DesignRating({
  super.key,
  required this.value,
  required this.onChanged,
  required this.itemBuilder,
  this.itemCount = 5,
  this.allowHalf = false,
  this.readOnly = false,
  this.layoutBuilder,
  this.onChangeStart,
  this.onChangeEnd,
  this.semanticLabel,
  this.semanticFormatterCallback,
  this.focusNode,
  this.autofocus = false,
  this.mouseCursor,
}) : assert(itemCount > 0),
     assert(value >= 0 && value <= itemCount);