StarRateView is a star rating library created in SwiftUI.
struct ContentView: View {
@State var rate: Double = 2.5
var body: some View {
StarRateView(starCount: 5, rate: self.rate)
.starSize(20)
.starPadding(4.0)
.forgroundStarColor(.yellow)
.backgroundStarColor(.gray)
}
}
StarRateView
is available via Swift Package Manager.
go to File -> Swift Packages -> Add Package Dependency
and enter https://github.com/giiiita/StarRateView