Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thangmam/smoothratingbar
A Smooth rating bar
https://github.com/thangmam/smoothratingbar
dart flutter-package rating-bar rating-plugin rating-stars
Last synced: about 1 month ago
JSON representation
A Smooth rating bar
- Host: GitHub
- URL: https://github.com/thangmam/smoothratingbar
- Owner: thangmam
- License: mit
- Created: 2018-09-02T02:31:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-30T05:15:14.000Z (over 2 years ago)
- Last Synced: 2024-08-03T09:06:59.039Z (4 months ago)
- Topics: dart, flutter-package, rating-bar, rating-plugin, rating-stars
- Language: Dart
- Size: 180 KB
- Stars: 148
- Watchers: 5
- Forks: 75
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-star - smoothratingbar
README
A Star rating with touch and swipe rate enabled
* Supports replacing default star icons with desired IconData
* 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
* Supports click-to-rate
* Spacing between stars## Getting Started
In your flutter project add the dependency:
```
dependencies:
...
smooth_star_rating: 1.0.4+2
```## Usage example
```
import 'package:smooth_star_rating/smooth_star_rating.dart';
``````java
SmoothStarRating(
allowHalfRating: false,
onRatingChanged: (v) {
rating = v;
setState(() {});
},
starCount: 5,
rating: rating,
size: 40.0,
filledIconData: Icons.blur_off,
halfFilledIconData: Icons.blur_on,
color: Colors.green,
borderColor: Colors.green,
spacing:0.0
)
```## 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
spacing - Spacing between stars(default is 0.0)
filledIconData - Full Rated Icon
halfFilledIconData - Half Rated Icon
defaultIconData - Default Rated Icon
```### 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")
### MIT LICENSE
### Let me know if you find any bugs/issues.Thanks.
[](https://www.paypal.me/thangmam)