RatingBar.readOnly constructor

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

Implementation

RatingBar.readOnly({
  Key key,
  this.maxRating = 5,
  @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 = true,
      onRatingChanged = null,
      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);