We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RatingBar widget I use: RatingBar( initialRating: user.recommendations[indexOfCurrentSong].rating.toDouble(), minRating: 1, direction: Axis.horizontal, allowHalfRating: false, itemCount: 5, itemPadding: EdgeInsets.symmetric(horizontal: 1), ratingWidget: RatingWidget( empty: Icon( Icons.star, color: Colors.grey, ), half: Icon( Icons.star_half, color: Theme.of(context).colorScheme.primary, ), full: Icon( Icons.star, color: Theme.of(context).colorScheme.primary, )), onRatingUpdate: (rating) { //TO DO: add a rating update to the server!!!! user.recommendations[indexOfCurrentSong].rating = rating.toInt();
user.setSongRating(indexOfCurrentSong, rating.toInt()); print(rating); }, )
When rebuilding the page with the setState() method, the rating stays the old rating and not the 'new' initialrating.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
RatingBar widget I use:
RatingBar(
initialRating:
user.recommendations[indexOfCurrentSong].rating.toDouble(),
minRating: 1,
direction: Axis.horizontal,
allowHalfRating: false,
itemCount: 5,
itemPadding: EdgeInsets.symmetric(horizontal: 1),
ratingWidget: RatingWidget(
empty: Icon(
Icons.star,
color: Colors.grey,
),
half: Icon(
Icons.star_half,
color: Theme.of(context).colorScheme.primary,
),
full: Icon(
Icons.star,
color: Theme.of(context).colorScheme.primary,
)),
onRatingUpdate: (rating) {
//TO DO: add a rating update to the server!!!!
user.recommendations[indexOfCurrentSong].rating =
rating.toInt();
When rebuilding the page with the setState() method, the rating stays the old rating and not the 'new' initialrating.
The text was updated successfully, but these errors were encountered: