getRatingBarColor function
- int rating
Implementation
Color getRatingBarColor(int rating) {
if (rating >= 1 && rating <= 2) {
return redRatingColor;
} else if (rating > 2 && rating <= 3) {
return orangeRatingColor;
} else if (rating >= 4 && rating <= 5) {
return successStatus;
} else {
return Color(0xFFE80000);
}
}