starreviews 1.0.5 icon indicating copy to clipboard operation
starreviews: ^1.0.5 copied to clipboard

A flutter package for displaying detailed star reviews

starreviews #

A flutter package for displaying detailed star reviews

Install #

dependencies:  
  starreviews: ^1.0.4
$  flutter pub get
import  'package:starreviews/starreviews.dart';

Usage #

List<String> _names = ['Star 5', 'Star 4', 'Star 3', 'Star 2', 'Star 1'];  
List<double> _values = [0.5, 0.2, 0.8, 0.5, 0.1];
StarReviews(  
    total: 20,  
    starNames: _names,  
    values: _values,  
    showPercentage: true,  
    average: 3.2,
)
StarReviewsHorizontal(
    total: 30,
    starNames: _names,
    showProgressBarBorder: false,
    valueColor: Colors.black,
    progressBarBackgroundColor: Colors.grey.withOpacity(0.4),
    values: _values,
    showPercentage: true,
    starColor: Colors.black,
    average: 4.2,
)

Customization #

Here is a list of properties available to customize the widget:

NameTypeDescription
totalinttotal numbers of reviews
showHeaderboolif false, hides header
showBottomboolif false, hides bottom reviews
showPercentageboolif false, hides rating number
starNamesListlist of star names (max 5)
percentageStyleTextStylestyle applied to percentage
showPercentageboolif false, hides percentage
valueColorColorcolor of the progressbar
progressBarBackgroundColorColorcolor of the progress bar background
valuesListlist of review values as double
starSizedoublethe size of the stars
starColorColorthe color of the stars
averagedoublethe average number that'll be displayed
showProgressBarBorderbooloption to hide borders of the progress bar
lineHeightdoubleheight of the progress bar
spaceBetweendoublethe space between progress bars

Contributions #

Contributions of any kind are more than welcome! Feel free to fork and improve in any way you want, make a pull request, or open an issue.

6
likes
70
pub points
13%
popularity

Publisher

unverified uploader

A flutter package for displaying detailed star reviews

Homepage

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter, percent_indicator

More

Packages that depend on starreviews