rating_slider 1.0.0 copy "rating_slider: ^1.0.0" to clipboard
rating_slider: ^1.0.0 copied to clipboard

A highly customizable Flutter rating bar that supports drag and tap interactions, half ratings, and dynamic icons.

RatingSlider #

Pub License

A highly customizable Flutter rating bar that supports drag and tap interactions, half ratings, and dynamic icons.

Rating Slider Demo

Usage #

RatingSlider(
  initialRating: _rating,
  iconBuilder: (context, index, type) {
  switch (type) {
    case RatingType.full:
    return const Icon(Icons.star, color: Colors.amber);
    case RatingType.half:
    return const Icon(Icons.star_half, color: Colors.amber);
    case RatingType.empty:
    default:
    return const Icon(Icons.star_border, color: Colors.grey);
    }
  },
  onRatingUpdate: (rating) {
    debugPrint("Rating: $rating");
    setState(() {
    _controller.text = rating.toStringAsFixed(1);
    _rating = rating;
    });
  },
),

For more examples, check the /example folder in the repository.

2
likes
150
points
10
downloads

Publisher

verified publisherfebryardiansyah.my.id

Weekly Downloads

A highly customizable Flutter rating bar that supports drag and tap interactions, half ratings, and dynamic icons.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on rating_slider