sarbagyastha / flutter_rating_bar

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

Support for unrated colours #12

Closed MsXam closed 5 years ago

MsXam commented 5 years ago

I have recently upgraded from 1.1.1 to the latest version and notice a couple of issues :

a) Placing a RatingBar inside certain containers (i.e a Chip) prevents RatingBar gestures from firing.

b) It is not possible to have the colour WHITE as a rating :

image

When there is a non rating, it is not possible to see this, regardless of the 'alpha' value that can be set.

MsXam commented 5 years ago

Note - worked in previous versions because you had support for both fillColor and emptyColor - now these have been removed because you implicitly set the unfilled/unrated colour to be an ALPHA value of 80 of the rated colour but this doesnt work in instances where the rating bar requires a WHITE rated colour or an unrated colour different to the rated colour's value as Alpha 80.

sarbagyastha commented 5 years ago

@MsXam will be updating the package tomorrow with the fix.

sarbagyastha commented 5 years ago

@MsXam Version 2.0.0+1 now includes unratedColor property.

sarbagyastha commented 5 years ago

Chip internally composes of InkWell widget, which interferes with RatingBar's gesture detector. You may create your own Container/Material with borderRadius to achieve the same instead.

MsXam commented 5 years ago

This is perfect. Have tested 2.0.0+1 with the unratedColor property and works as intended.

Also , yes, 'Container with a Decoration' will allow similar LNF as Chip - so thats not an issue.

RatingBar is excellent now - thank you.

sarbagyastha commented 5 years ago

You're most welcome!