Closed Skquark closed 6 years ago
I took the liberty to mod the flutter_rating.dart file and was surprisingly simple and elegant. I at least fixed the background color and centered it. Here's the build function I changed:
@override
Widget build(BuildContext context) {
return new Material(
type: MaterialType.transparency,
child: new Center(
child: new Row(
mainAxisAlignment: MainAxisAlignment.center,
children: new List.generate(starCount, (index) => buildStar(context, index))
),
),
);
}
I saw that you did set it up for the half star feature, but you didn't finish implementing it yet. I also tried to make the splash circle smaller, but didn't get it right yet. I thought I just needed to add a small radius to the InkResponse component, but it didn't change it. Might need to figure out the splashFactory to fine tune that, don't know, new to me. Getting there though. Thanks.
I've just made a PR for the background transparency
Thanks for this component, was just what I needed. I got it implemented in my app with no problems, but there were a couple things I couldn't customize. For one, the background color of the ratings bar is white, and I needed to change it since I'm using an off-white background. Simple enough. I also wanted the stars centered in there, but I put it in a Center parent and it didn't change it. Alignment might be a good option to add. For future enhancements, I'd suggest being able to slide/drag the stars as well as pressing it, and to have an option for half stars as well, especially since the rating field is a double instead of int. Those things aren't critical, but would make it cooler. Might be difficult to add since I see the stars are IconButtons and you might not be able to put a GestureDetector on it. I didn't quite like the way it presses with the InkWell splash onPress because the ink gets cut off in the widget container, and the splash bleeds into the stars next to it, and it just looked kinda weird... Not trying to make more work for ya, but wanted to give you my feedback. Thanks.