rating_bar

Creator: coderz1093

Last updated:

Add to Cart

Description:

rating bar

rating_bar #
A customizable Rating Bar for flutter with half rating support

Installation #
Add this to your package's pubspec.yaml file
dependencies:
...
rating_bar: ^latest.version.here
copied to clipboard
Usage #
First import paging.dart
import 'package:rating_bar/rating_bar.dart';
copied to clipboard
onRatingChanged callback returns current rating which is a double,
when the rating has changed.
RatingBar(
onRatingChanged: (rating) => setState(() => _rating = rating),
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
halfFilledIcon: Icons.star_half,
isHalfAllowed: true,
filledColor: Colors.green,
emptyColor: Colors.redAccent,
halfFilledColor: Colors.amberAccent,
size: 48,
),
copied to clipboard
You can also use read-only rating bar widget
RatingBar.readOnly(
initialRating: 3.5,
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
),
copied to clipboard
Screenshots #

License #
MIT License

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.