Rate constructor
Rate({
- Key? key,
- int count = 5,
- required int value,
- double size = Style.rateIconSize,
- double gutter = Style.rateHorizontalGutter,
- IconData icon = Icons.star,
- IconData voidIcon = Icons.star_border,
- Color color = Style.rateActiveColor,
- Color voidColor = Style.rateInactiveColor,
- bool readonly = false,
- bool disabled = false,
- dynamic onChange(
- String val
Implementation
Rate({
Key? key,
this.count: 5,
required this.value,
this.size: Style.rateIconSize,
this.gutter: Style.rateHorizontalGutter,
this.icon: Icons.star,
this.voidIcon: Icons.star_border,
this.color: Style.rateActiveColor,
this.voidColor: Style.rateInactiveColor,
this.readonly: false,
this.disabled: false,
this.onChange,
}) : assert(count > 1 && value >= 1, 'count 或 value 不能小于1'),
super(key: key);