sarbagyastha / flutter_rating_bar

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

wrap alignment does nothing #78

Open martipello opened 2 years ago

martipello commented 2 years ago

change wrap alignment to center or start and observe it does nothing check the code and see its not being used

return Material(
  color: Colors.transparent,
  child: Wrap(
    alignment: WrapAlignment.start,
    textDirection: textDirection,
    direction: widget.direction,
    children: List.generate(
      widget.itemCount,
      (index) => _buildRating(context, index),
    ),
  ),
);

}

i think this alignment: WrapAlignment.start, should be widget.wrapAlignment

ccosnean commented 1 year ago

@martipello i have the same issue, this needs more attention.

DevTiago commented 1 year ago

Same here! I can't align the rate bar to parent widget..

DevTiago commented 1 year ago

Well, until this isn't fixed i've user RatingBar.build inside an Align widget to center the rating bar. Don't forget to handle the itemSize to prevent your UI to break on smaller devices.

wheeOs commented 10 months ago

this issue should be fixed by this line: https://github.com/sarbagyastha/flutter_rating_bar/blob/58ff76f81297838390dd950a30240593e7459af5/lib/src/rating_bar.dart#L241C41-L241C41

but currently flutter_rating_bar is pretty outdated on pub.dev