RatingBar constructor

RatingBar(
  1. {Key key,
  2. int maxRating: 5,
  3. @required RatingCallback onRatingChanged,
  4. @required IconData filledIcon,
  5. @required IconData emptyIcon,
  6. IconData halfFilledIcon,
  7. bool isHalfAllowed: false,
  8. double initialRating: 0.0,
  9. Color filledColor,
  10. Color emptyColor: Colors.grey,
  11. Color halfFilledColor,
  12. double size: 40}
)

Implementation

RatingBar({
  Key key,
  this.maxRating = 5,
  @required this.onRatingChanged,
  @required this.filledIcon,
  @required this.emptyIcon,
  this.halfFilledIcon,
  this.isHalfAllowed = false,
  this.initialRating = 0.0,
  this.filledColor,
  this.emptyColor = Colors.grey,
  this.halfFilledColor,
  this.size = 40,
})  : _readOnly = false,
      assert(maxRating != null),
      assert(initialRating != null),
      assert(filledIcon != null),
      assert(emptyIcon != null),
      assert(isHalfAllowed != null),
      assert(!isHalfAllowed || halfFilledIcon != null),
      assert(size != null),
      super(key: key);