smooth_star_rating 0.0.4 copy "smooth_star_rating: ^0.0.4" to clipboard
smooth_star_rating: ^0.0.4 copied to clipboard

outdated

A smooth rating bar

A Star rating with touch swipe enabled increment/decrement

  • Supports half rate and full rate (1.0 or 0.5)
  • Swipe for incrementing/decrementing rate amount
  • Change star body and boundary colors independently
  • Control size of the star rating
  • Set your desired total Star count

Getting Started #

In your flutter project add the dependency:

    dependencies:
        ...
        smooth_star_rating: ^0.0.4

Usage example #

import 'package:smooth_star_rating/smooth_star_rating.dart'; 
StarRating(
          allowHalfRating: false,
          onRatingChanged: (v) {
            rating = v;
            setState(() {});
          },
          starCount: 5,
          rating: rating,
          size: 40.0,
          color: Colors.green,
          borderColor: Colors.green,
        )

Constructor parameters #

allowHalfRating                 -   Whether to use whole number for rating(1.0  or 0.5)
onRatingChanged(int rating)     -   Rating changed callback
starCount                       -   The maximum amount of stars
rating                          -   The current value of rating
size                            -   The size of a single star
color                           -   The body color of star
borderColor                     -   The border color of star

Screenshots #

Full Rating

alt text

Half Rating

alt text

340
likes
10
pub points
95%
popularity

Publisher

unverified uploader

A smooth rating bar

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on smooth_star_rating