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

Placing a single child of row in center #6

Closed
AliYar-Khan opened this issue Mar 18, 2020 · 3 comments
Closed

Placing a single child of row in center #6

AliYar-Khan opened this issue Mar 18, 2020 · 3 comments

Comments

@AliYar-Khan
Copy link

Need help in placing on child of Row which is a col to be in center in row. In Bootstrap there is some classes like "row align-items-center" and "col align-items-center". How i can achieve this !

@muhammad369
Copy link
Owner

place the item inside 'Center' Widget

@codegrue
Copy link

codegrue commented Jun 12, 2020

This also applies to any number of items that don't fit on a row. I have 1000px of horizontal space and two items that are 300px each, they appear left-justified instead of centered.

return ResponsiveGridList(
  desiredItemWidth: 300,
  minSpacing: 10,
  children: [
    profilePanel,
    accountPanel,
  ],
);

Screen Shot 2020-06-12 at 4 28 49 PM

Note: "inside 'Center' Widget" doesn't work because ResponsiveGridList expands to take up all available space.

@muhammad369
Copy link
Owner

excuse me for the so late response
use version 1.2.0
and set the ResponsiveGridList property rowMainAxisAlignment to center

return ResponsiveGridList(
        rowMainAxisAlignment: MainAxisAlignment.center,

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

3 participants