Skip to content
New issue

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

It ignore the alignment property #112

Closed
jasjastone opened this issue May 17, 2024 · 1 comment
Closed

It ignore the alignment property #112

jasjastone opened this issue May 17, 2024 · 1 comment

Comments

@jasjastone
Copy link

jasjastone commented May 17, 2024

Hi, Thanks for making an awesome package. But

I got an issue with the rating they don't really accepts the full width and the i don't know what wrap was supported to do rather than change the rating direction to column when there is no enough space,
So here is the deal.
I got my rating ***** but i want them to occupy the full width of the screen or at least the full width of the parent container.
What have i tried,
First i thought i set the wrap to space-between or space-evenly will force them to copy full width but no it doesn't or at least i know what i doesn't since didn't get any effect on changing it(I want to mentioned that i look at source code and found that wrap is hard coded to wrap.start even change it doesn't make any difference).
Second, i try to wrap it with a Container and SizedBox and give them a full width with media query but still it doesn't occupy the full width

Long story short here is the image that i want the rating to look like:
rating
The above is the image that show rating that is on a full screen on an andriod app with 300x600px
If you have any idea please share.

@jasjastone
Copy link
Author

jasjastone commented Jun 20, 2024

Hi,
I manage to fix the issue as it was caused by simple passing of the wrapAlignment parameter to the Material and that's it.
Sadly i make the changes on my own if someone has face the same isse just go to the

return Material(
      color: Colors.transparent,
      child: Wrap(
        alignment: WrapAlignment.start, // the issue laid here so change it to widget.wrapAlignment
        textDirection: textDirection,
        direction: widget.direction,
        children: List.generate(
          widget.itemCount,
          (index) => _buildRating(context, index),
        ),
      ),
    );

Or if you want me to make a pr for i would but, from other PRs as taking so much time to review them therefore i don't think the maintainer is active or possibly abandoned the package or something.
Thank you anyways.

EDIT: The main issue was not the width rather the alignment, so you will continue to use the alignment parameter but now it will work instead of being ignored

@jasjastone jasjastone changed the title Doesn't take a Full Width It ignore the alignment property Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant