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

[BUGS] Button in ResponsiveRowColumnItem cannot expanded #160

Open
moshOntong-IT opened this issue Oct 26, 2023 · 2 comments
Open

[BUGS] Button in ResponsiveRowColumnItem cannot expanded #160

moshOntong-IT opened this issue Oct 26, 2023 · 2 comments

Comments

@moshOntong-IT
Copy link

    Padding(
            padding: const EdgeInsets.symmetric(horizontal: 16),
            child: ResponsiveRowColumn(
              columnSpacing: 5,
              rowSpacing: 5,
              columnCrossAxisAlignment: CrossAxisAlignment.center,
              columnMainAxisAlignment: MainAxisAlignment.center,
              rowCrossAxisAlignment: CrossAxisAlignment.center,
              rowMainAxisAlignment: MainAxisAlignment.center,
              layout: breakpoint.isMobile
                  ? ResponsiveRowColumnType.COLUMN
                  : ResponsiveRowColumnType.ROW,
              children: [
                ResponsiveRowColumnItem(
                  rowFlex: 2,
                  child: OutlinedButton(
                    style: OutlinedButton.styleFrom(
                      padding: buttonPadding,
                    ),
                    onPressed: () {},
                    child: const Text(
                      'Send Message',
                    ),
                  ),
                ),
                ResponsiveRowColumnItem(
                  child: FilledButton(
                    style: FilledButton.styleFrom(
                      padding: buttonPadding,
                    ),
                    onPressed: () {},
                    child: const Text('Profile'),
                  ),
                ),
              ],
            ),
          ),
  • The Buttons did not expanded based on the Flex of its parent which is ResponsiveRowColumnItem, how ever when I am uising Container, it will adapt the sizes based on its parent, only buttons occur the error
@anas43950
Copy link

anas43950 commented May 18, 2024

Facing same issue when using Text widget inside ResponsiveRowColumnItem, I worked it around by placing the Text inside a column and setting it's crossAxisAlignment to stretch

Edit: you can also set rowFit: FlexFit.tight in ResponsiveRowColumnItem to fill the available space

@rayliverified
Copy link
Contributor

rayliverified commented May 18, 2024 via email

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