Codelessly / ResponsiveFramework

Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple. Demo: https://gallery.codelessly.com/flutterwebsites/minimal/
https://codelessly.com
MIT License
1.25k stars 150 forks source link

[BUGS] Button in ResponsiveRowColumnItem cannot expanded #160

Open moshOntong-IT opened 10 months ago

moshOntong-IT commented 10 months ago
    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'),
                  ),
                ),
              ],
            ),
          ),
anas43950 commented 3 months ago

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 commented 3 months ago

Let's investigate tomorrow 🙂

On Sat, 18 May 2024, 1:49 am Anas Ansari, @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/Codelessly/ResponsiveFramework/issues/160#issuecomment-2118667264, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXZO3XTYGWKMUUDXA72JJDZC32Y7AVCNFSM6AAAAAA6QLODM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJYGY3DOMRWGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>