RatingBarFlutter.readOnly constructor Null safety

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

Implementation

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