搜索插件、代码仓与 APP 分类

rating_summary 封面
插件详情v1.0.4

rating_summary

创建一个摘要统计小部件,用于显示产品的评分和平均评分。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
324
喜欢数
54
Pub 分数
160

安装插件

flutter pub add rating_summary

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

rating_summary 包提供了一个可自定义的控件,用于显示产品评分统计信息,包括单个评分和平均评分。该控件旨在通过在多个平台上以简洁直观的格式呈现评分数据,从而增强用户反馈界面。该控件支持动态更新,并可无缝集成到 Flutter 应用中。该包注重简洁性和性能,使开发者能够快速实现专业外观的评分摘要,而无需进行大量自定义编码。

适合场景

  • 在电子商务应用中显示产品评分
  • 在评价页面上显示平均评分
  • 增强用户反馈界面
  • 在移动和网页应用中集成评分统计
  • 可视化客户满意度指标
  • 创建交互式评审仪表板

主要特点

  • 预构建的评分摘要 UI
  • 支持平均评分显示
  • 可自定义外观
  • 跨平台兼容性
  • 与 Flutter 的轻松集成
  • 动态数据更新

适合对象

  • 电子商务应用开发者
  • 评审和反馈系统设计师
  • 移动和网页应用开发者
  • 使用Flutter的UI/UX设计师
  • 寻求快速评分组件的开发者

使用建议

  • 需要 Flutter SDK 设置
  • 仅限评分相关使用场景
  • 无内置评分输入功能
  • 依赖外部GitHub仓库
  • 可能需要额外的样式来实现复杂的设计

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

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. Widget Text( '5', style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold)) -
labelCounterFourStars The label of the 4 star rating. Widget Text( '4', style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold)) -
labelCounterThreeStars The label of the 3 star rating. Widget Text( '3', style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold)) -
labelCounterTwoStars The label of the 2 star rating. Widget Text( '2', style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold)) -
labelCounterOneStars The label of the 1 star rating. Widget Text( '1', style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold)) -
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) -
space The space between the label and the bar. double 20 -
thickness The thickness of the bar. doubel 10 -
starColor The color of stars. Color Colors.amber -
alignment The alignment of rating summary. CrossAxisAlignment CrossAxisAlignment.center -

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。