Giter Site home page Giter Site logo

realm-3 / starreviews Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 3.0 217 KB

A flutter package for displaying detailed star reviews

License: MIT License

Kotlin 2.59% Swift 2.59% Objective-C 0.24% Dart 94.59%
flutter review star android ios flutter-package

starreviews's Introduction

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:

Name Type Description
total int total numbers of reviews
showHeader bool if false, hides header
showBottom bool if false, hides bottom reviews
showPercentage bool if false, hides rating number
starNames List list of star names (max 5)
percentageStyle TextStyle style applied to percentage
showPercentage bool if false, hides percentage
valueColor Color color of the progressbar
progressBarBackgroundColor Color color of the progress bar background
values List list of review values as double
starSize double the size of the stars
starColor Color the color of the stars
average double the average number that'll be displayed
showProgressBarBorder bool option to hide borders of the progress bar
lineHeight double height of the progress bar
spaceBetween double the 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.

starreviews's People

Contributors

buraktabn avatar shinriyo avatar

Stargazers

Nidhun Balaji T R avatar  avatar

Watchers

James Cloos avatar Zain Malik avatar  avatar

starreviews's Issues

[Feature]Hide bars

I want only header, stars.

showHeader option is available, but I need showBottom option.
And I want to set false

star

Make percentage field fixed

When others haven't got the same decimal count, the percentage bar gets the full width. This makes it look longer than the others.

Wrapping the percentage field with SizedBox would solve the problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.