搜尋套件、儲存庫與 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 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。