Giter VIP home page Giter VIP logo

floodoo / rating_summary Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 5.0 625 KB

Create a summary statistic Widget to display the rating and average rating of a product.

Home Page: https://pub.dev/packages/rating_summary

License: MIT License

Kotlin 0.22% Swift 2.07% Objective-C 0.07% Dart 21.02% CMake 33.41% C++ 37.41% C 2.55% HTML 3.25%
flutter rating rating-component rating-statistics ratingbar summary-statistics widget

rating_summary's Introduction

Rating Summary Widget

Create a summary statistic Widget to display the rating and average rating of a product.

Screenshot of the raring summary widget with the average rewiew indicator Screenshot of the raring summary widget without the average rewiew indicator

Installing:

  1. Add the dependency in your pubspec.yaml file.
dependencies:
  rating_summary: ^1.0.2+1
  1. Import the rating_summary package.
import 'package:rating_summary/rating_summary.dart';

Usage

RatingSummary(
  counter: 13,
  average: 3.846,
  showAverage: true,
  counterFiveStars: 5,
  counterFourStars: 4,
  counterThreeStars: 2,
  counterTwoStars: 1,
  counterOneStars: 1,
)

Parameters

Parameter Description Type Default Required
counter The total number of ratings. int - โœ“
average The average rating. double 0.0 -
showAverage Show the average rating indicator. bool true -
averageStyle The style of the average rating indicator. TextStyle TextStyle(fontWeight: FontWeight.bold, fontSize: 40) -
counterFiveStars The number of 5 star ratings. int 0 -
counterFourStars The number of 4 star ratings. int 0 -
counterThreeStars The number of 3 star ratings. int 0 -
counterTwoStars The number of 2 star ratings. int 0 -
counterOneStars The number of 1 star ratings. int 0 -
labelCounterFiveStars The label of the 5 star rating. String "5" -
labelCounterFourStars The label of the 4 star rating. String "4" -
labelCounterThreeStars The label of the 3 star rating. String "3" -
labelCounterTwoStars The label of the 2 star rating. String "2" -
labelCounterOneStars The label of the 1 star rating. String "1" -
labelCounterFiveStarsStyle The style of the 5 star rating label. TextStyle TextStyle(fontSize: 14, fontWeight: FontWeight.bold) -
labelCounterFourStarsStyle The style of the 4 star rating label. TextStyle TextStyle(fontSize: 14, fontWeight: FontWeight.bold) -
labelCounterThreeStarsStyle The style of the 3 star rating label. TextStyle TextStyle(fontSize: 14, fontWeight: FontWeight.bold) -
labelCounterTwoStarsStyle The style of the 2 star rating label. TextStyle TextStyle(fontSize: 14, fontWeight: FontWeight.bold) -
labelCounterOneStarsStyle The style of the 1 star rating label. TextStyle TextStyle(fontSize: 14, fontWeight: FontWeight.bold) -
label The label of the rating summary. String "Rating" -
labelStyle The style of the label. TextStyle TextStyle(fontWeight: FontWeight.w600) -
color The primary color of the rating summary. Color Colors.amber -
backgroundColor The background color of the rating summary. Color Color(0xFFEEEEEE) -

rating_summary's People

Contributors

borisvelts avatar floodoo avatar

Stargazers

 avatar

Watchers

 avatar

rating_summary's Issues

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.