sarbagyastha / flutter_rating_bar

A simple ratingbar for flutter which also include a rating bar indicator, supporting any fraction of rating.
MIT License
407 stars 103 forks source link

onRatingUpdate not always called when fast dragging #76

Open mattia-venturini opened 2 years ago

mattia-venturini commented 2 years ago

I have a RatingBar with updateOnDrag: true and the onRatingUpdate callback set to update my app's state.

When dragging fast I see that onRatingUpdate is not called with the latest value, so that I get a value that is different from the one displayed by the stars.

NOTE: I would have tried a workaround looking at the State, but I would need a public getter to access _rating

adarshwebcastle commented 1 year ago

Same issue for me, Any update?

peterweb2005 commented 1 year ago

in _onDragUpdate(), as iconRating is normally determined in build methods so the call to onRatingUpdate() shouldnt be arg with iconRating, but _rating