VxRating
VelocityX gives you VxRating - To show ratings to the user and the user can change it too. Fully customizable.
By default.
important
Video Tutorial
note
The default rating count is 5 and the maximum rating is 10 (including half ratings).
Using VxRating
VxRating(
onRatingUpdate: (value) {},
)
Using the VxRating properties. Use onRatingUpdate() to get the selected value.
VxRating(
onRatingUpdate: (value) {},
count: 5,
selectionColor: Colors.teal,
size: 30,
)
Sample Output
tip
Use default icon for better quality.
Properties
Prop (Type) | Default | Description |
---|---|---|
maxRating (double) | 10 | The maximum rating which can be given |
count (int) | 5 | Stars count |
value (int) | 10 | Currently selected value |
size (double) | 20 | Size of the icon/image |
padding (double) | 0 | To give space between the stars/icons |
normalImage (dynamic) | To provide a custom image of star/rating (unselected) | |
selectImage (dynamic) | To provide a custom image of star/rating (selected) | |
normalColor (Color) | Colors.grey | Unselected color of the icon |
selectionColor (Color) | Colors.red | Selected color of the icon |
isSelectable (bool) | true | If the rating is selectable or not |
stepInt (int) | false | true if Half star not allowed |