一個適用於 Flutter 的平滑評分條組件,提供視覺上吸引人且互動性強的基於星形的評分系統。此組件採用空安全設計,確保在 Android、iOS、Web、macOS、Windows 及 Linux 等所有平台上的可靠性能。該套件支援自訂星星外觀,評分變更時具備流暢動畫,並支援互動與唯讀模式。非常適合用於使用者反饋表單、產品評論及應用程式評分。簡潔的 API 讓整合簡單且高效。
適用情境
使用者評論和反饋
產品評分系統
應用審核介面
互動式表單元素
調查中的評分收集
主要特色
評分變更時的平滑動畫
可自定的星星大小和顏色
空安全實現
支援互動式和非互動式模式
跨平台相容性
適合對象
開發反饋表單的開發者
需要直覺評分輸入的應用程式
針對多個平台的專案
以使用者介面為重點的應用程式
Flutter 初學者尋找簡單的組件
使用建議
需要手動處理評分值更新
僅限星級評分
無內建驗證
最適合單評分情境
可能需要額外的樣式來處理複雜的使用者介面
原始 README
以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。
This is the null safety version of smooth_star_rating
All the credits go to the original authors,
You can find the original package here
https://pub.dev/packages/smooth_star_rating
A Star rating with touch and swipe rate enabled
Supports replacing default star icons with desired IconData
Supports half rate and full rate (1.0 or 0.5)
Swipe for incrementing/decrementing rate amount
Change star body and boundary colors independently
allowHalfRating - Whether to use whole number forrating(1.0 or 0.5)
onRatingChanged(int rating) - Rating changed callback
starCount - The maximum amount of stars
rating - The current value of rating
size - The size of a single star
color - The body color of star
borderColor - The border color of star
spacing - Spacing between stars(defaultis0.0)
filledIconData - FullRatedIcon
halfFilledIconData - HalfRatedIcon
defaultIconData - DefaultRatedIcon