-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* dev: cleanup readme file version upgraded since pub.dartlang.org would not allow resource update without incremented version screenshots # Conflicts: # README.md
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
|
||
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'; | ||
``` | ||
|
||
```java | ||
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](https://raw.githubusercontent.com/thangmam/smoothratingbar/master/screenshots/fullrating.gif "Full rating") | ||
|
||
#### Half Rating | ||
|
||
![alt text](https://raw.githubusercontent.com/thangmam/smoothratingbar/master/screenshots/halfrating.gif "Half Rating") |