simple_animated_rating_bar 0.0.1
simple_animated_rating_bar: ^0.0.1 copied to clipboard
A simple animated rating bar to help you implement a rating system in your app.
A simple animated rating bar to help you implement a rating system in your app.
Features #
- Change between 5 types of animation(bounce, shake, bounceDiagonally, rotate and none).
- Change the intensity of the animations.
- Use any widget as rating indicator.
- Rating 1 to 5.
Usage #
- Declare a AnimatedRatingBar with the desired parameters, the rowHeight parameter should have the same height that you rating widget has.
AnimatedRatingBar(
animationType: ARBAnimationType.rotate,
rowHeight: 50,
emptyWidget: Icon(
Icons.star_border_rounded,
size: 48,
color: Colors.white,
),
fullWidget: Icon(
Icons.star_rounded,
size: 48,
color: Colors.white,
),
),
- You can use shake:
- Or bounce:
- There are others parameters you can change to personalize your ratingbar like animation intensity, rating widget. You can recover the rating value using the callback method
AnimatedRatingBar(
animationType: ARBAnimationType.rotate,
rowHeight: 50,
emptyWidget: Icon(
Icons.star_border_rounded,
size: 48,
color: Colors.white,
),
fullWidget: Icon(
Icons.star_rounded,
size: 48,
color: Colors.white,
),
//here
onRatingChanged: (value) {
int rating = value;
},
),
Additional information #
Feel free to do pull requests or ask for changes on issues(on gitHub). There is a simple example on the github.